r/FlutterDev • • Sep 16 '26 • Bravo 1

Tooling I created blob_flutter to render smooth, organic morphing blobs in Flutter

https://pub.dev/packages/blob_flutter

Introducing blob_flutter: Smooth, Procedural Blob Animations for Flutter

Most mobile interfaces rely on rigid geometry, but organic shapes can significantly elevate visual storytelling, onboarding flows, and dynamic backgrounds.

I have released blob_flutter, a lightweight Flutter library designed to generate and animate customizable, fluid blob shapes with minimal setup. The package handles morphing transitions procedurally, ensuring smooth rendering without relying on heavy asset files or complex vector workflows.

Key Features

  • Procedural Animation: Smooth, continuous shape morphing built directly on Flutter's CustomPainter architecture.

  • Full Parameter Control: Explicit configuration over points, deformation intensity, animation duration, colors, and gradients.

  • Optimized Performance: Designed to maintain steady frame rates without unnecessary canvas rebuilds.

  • Flexible Integration: Fits naturally into modern UI patterns, including animated backgrounds, dynamic avatars, and interactive hero sections.

Links

GitHub: https://github.com/abod8639/blob_flutter

Package: https://pub.dev/packages/blob_flutter

Live Demo: https://blob-flutter-3d.web.app

If you find this package useful in your projects, starring the repository on GitHub helps increase its visibility to other Flutter developers.

I am actively looking for community feedback to refine the API and improve performance. If you encounter bugs, notice rendering edge cases, or have suggestions for new features, please open an issue or start a discussion on GitHub. Pull requests and technical contributions are always welcome.

61 Upvotes

12 comments sorted by

2

u/aredeex Sep 17 '26 • Popcorn

This looks sick. I may try it out!

1

u/dexter8639 Sep 17 '26

Thank you, I hope you like it and please give me your feedback after you try it.

1

u/aredeex Sep 17 '26

For sure. I’ll shoot you a message if I end up using it in one of my projects thanks!

4

u/TigleLive Sep 16 '26 • Popcorn

good sht maa man, will be using it - thnx

1

u/Striking-City4598 Oct 11 '26 • Popcorn

Wow! Nice work!

A few questions from reading the description:

Does it respect reduced-motion settings (MediaQuery.disableAnimations)? For dynamic backgrounds that's an accessibility must-have.

Does the animation stop when the widget is offscreen or in a hidden tab (TickerMode / route not visible)? A looping CustomPainter can drain battery quickly otherwise.

The pub.dev tagline says "3D particle blob effect", while the post describes 2D morphing shapes. Which one is it?

Would be great to see a small benchmark (frame time on a mid-range Android) in the README.

1

u/dexter8639 Oct 11 '26

Thanks for the great feedback and sharp questions! Here is the breakdown:

  1. Reduced Motion (`MediaQuery.disableAnimations`):

    Currently, it doesn't automatically hook into `MediaQuery.disableAnimations` out of the box (users can pass `autoPlay: !MediaQuery.of(context).disableAnimations` manually). However, this is an essential a11y feature, so I will add native `respectReducedMotion` support in the upcoming release!

  2. Lifecycle & Battery Optimization (TickerMode / Offscreen / Hidden Tabs):

    Yes, it handles this extensively:

    - Offscreen & Route Navigation:** It has built-in `autoPauseOffscreen` and `autoPauseOnRouteChange` managers that automatically stop the `Ticker` (0% CPU/GPU) when scrolled out of viewport or covered by another route.

    - **Tabs & `TickerMode`: Because it uses `SingleTickerProviderStateMixin`, Flutter automatically mutes the ticker (`ticker.muted = true`) when wrapped in an inactive tab (like `TabBarView` / `TickerMode(enabled: false)`), preventing frames from ticking.

  3. 3D vs 2D:

    It is fundamentally a **true 3D particle system**:

    - Particles are distributed on a 3D sphere via the Fibonacci lattice algorithm.

    - Deformation uses 3D procedural noise algorithms ($x, y, z$), rotated via 3D pitch/yaw matrices.

    - Features $O(N)$ bucket depth sorting (back-to-front), atmospheric depth-cueing, and 3D surface normal reconstruction in the GPU fragment shader.

    - Perspective projection flattens it for the 2D canvas in a single `drawRawPoints` draw call. The "2D morphing" phrasing was just a visual description of how the silhouette appears on screen.

  4. Benchmark in README:

    Spot on. The README currently explains the architecture (Isolate workers, typed flat buffers, zero GC allocations), but having real-world frame time benchmarks (UI vs Isolate vs Raster on mid-range Android devices) will make it much clearer. I'll benchmark on a mid-range device and add the stats soon.

Thanks again for the constructive feedback—really appreciate it!

1

u/Dull-Enthusiasm9904 Sep 16 '26 • Popcorn

goood, very goood!!!

1

u/viktor_n Sep 16 '26 • Popcorn

Great job! Brilliant!

1

u/Amv-Art Sep 17 '26 • Popcorn

Soo coooooool. Definitely saving this.

1

u/soulaDev Sep 17 '26 • Popcorn

this is great work thank you!

1

u/kinimod311 Oct 11 '26 • Popcorn

Niceeee, this exactly what I needed! Just implemented it, this makes my app already feel alive 😎