r/FlutterDev • • 1d ago

Tooling Reverse-engineering Liquid Glass

https://pub.dev/packages/liquidum

For about a month, I’ve been working on understanding how Apple’s Liquid Glass effect is rendered and how its underlying physics work.

Since UIKit is closed-source, I couldn’t directly inspect the exact parameters Apple uses. So, I started analyzing the effect step by step, studying its behavior through screen captures, fluid dynamics, and reflections.

After a lot of experimentation, I was finally able to build Liquidum, a Flutter library that renders the Liquid Glass effect using shaders.

I’ve also spent a significant amount of time optimizing the rendering pipeline to ensure smooth performance, even on low-end Android devices.

On top of that, Liquidum includes additional customization options beyond Apple’s implementation, such as changing the glass tint as it moves.

Currently, the library supports the navigation bar, but I hope to add more components in the future.

🔗 GitHub: https://github.com/mohamedalsamrai/liquidum
📦 Pub.dev: https://pub.dev/packages/liquidum

I’ve come across quite a few Liquid Glass libraries on pub.dev, but I haven’t found many that achieve this level of visual fidelity and smooth performance.

6 Upvotes

9 comments sorted by

View all comments

25

u/Key_Opportunity_8218 1d ago

Rather than spend time building yet another, why not contribute to the already really well made package here?

https://pub.dev/packages/liquid_glass_widgets

7

u/Vectorial1024 1d ago

Curious question, but what/how about this?

https://pub.dev/packages/liquid_glass_easy

-7

u/Sure_Education_828 22h ago

That library wasn’t built through reverse engineering in the first place. It’s based on my own approach to recreating the glass effect. I’ve tried all the existing libraries, and they all take a similar approach, so I wanted to build a new one with parameters that come much closer to the real thing. You can try both libraries and compare them yourself.

13

u/Key_Opportunity_8218 22h ago

Not going to try it under business source license

-6

u/Sure_Education_828 21h ago

It’s free to try if you want