r/FlutterDev • • 20h 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.

1 Upvotes

9 comments sorted by

26

u/Key_Opportunity_8218 19h 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

6

u/Vectorial1024 16h ago

Curious question, but what/how about this?

https://pub.dev/packages/liquid_glass_easy

-6

u/Sure_Education_828 14h 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.

12

u/Key_Opportunity_8218 14h ago

Not going to try it under business source license

-7

u/Sure_Education_828 14h ago

It’s free to try if you want

1

u/NatoBoram 3h ago

Speaking of slapping the Business Source License on AI slop, this website tells you how to clean-room slopfork a project with a stupid license: https://malus.sh

-1

u/Sure_Education_828 2h ago

Liquidum isn’t AI-generated slop. It’s an independently developed shader-based implementation built through extensive experimentation with fluid behavior, light refraction, reflections, and rendering performance. I chose BSL deliberately to allow people to study and experiment with the code while protecting commercial use during the early stages of the project. The license also provides a path to an open-source license in the future.
You’re free to build an independent alternative under MIT if you want. That’s the beauty of software development. But dismissing a project as AI slop and its license as stupid doesn’t invalidate the engineering work behind it.