r/FlutterDev • • 2d 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.

10 Upvotes

13 comments sorted by

29

u/Key_Opportunity_8218 2d 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 2d ago

Curious question, but what/how about this?

https://pub.dev/packages/liquid_glass_easy

-4

u/Sure_Education_828 2d 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.

15

u/Key_Opportunity_8218 2d ago

Not going to try it under business source license

-7

u/Sure_Education_828 2d ago

It’s free to try if you want

3

u/NatoBoram 1d 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

-4

u/Sure_Education_828 1d 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.

1

u/pedro_picante 18h ago

Thanks Claude!

-1

u/Sure_Education_828 18h ago

Build something like that with Claude
And yah thanks Claude for writing Read me file

2

u/birjuvachhani 1d ago

Seems really interesting! If it matches Apples implementation 1:1 with all interactions, then it’s crazy good.

1

u/Realistic-Car-1205 9h ago

I like it, but why not make it free for commercial use... So sad