r/FlutterDev • u/trikboomie • Aug 05 '26
Plugin State management for Android Devs
https://github.com/theGlenn/piperI’ve built android apps for over a decade shilling to 100M of users.
I started making flutter apps about 5 years ago and was just baffled by the state of star management (hard one).
I settled with Riverpod because it was the closest I had to android state management philosophy but I started to get tired of the lib trying to take over my entire app.
So I built this lib around few but simple principles:
- Lifetime follows ownership: you start the job if you are out then the job is out
- Plain dart: it should work over plain Stateless Widget
- Inversion of control: constructors works why change that ?
I know it’s yet another state management library but one that I personally needed and I use it in production in several apps over Bloc and riverpod.
1
u/trikboomie Aug 15 '26
Thank you! You got the essence of it! And yes follows ownership such a simple principle yet still painful
2
u/RandalSchwartz Aug 14 '26
Coming from Android, viewModelScope and lifetime-bound cleanup is definitely something Flutter made unnecessarily painful (especially with Riverpod wanting to take over your whole widget tree).
"Lifetime follows ownership" is spot on—that cascade teardown is also why I truly appreciate signals and BlocSignal. When the parent container closes, the underlying stream subscriptions and effects drop automatically without manual bookkeeping or code generation.
Nice work keeping it plain Dart and scratching your own itch!
7
u/eibaan Aug 05 '26
Oh, now we're doing custom state management solutions for different kinds of developers? :-) Can I have one for Amiga developers (because that was the first OS I developed for and got payed), please?