r/FlutterDev • u/Plane_Trifle7368 • Oct 13 '25
Plugin Introducing Flumpose: A fluent, declarative UI extension for flutter
Hey everyone,
I’ve been working on Flumpose, a lightweight Flutter package that brings a declarative syntax to Flutter, but with a focus on performance and const safety.
It lets you write clean, chainable UI code like:
const Text('Hello, Flumpose!')
.pad(12)
.backgroundColor(Colors.blue)
.rounded(8)
.onTap(() => print('Tapped'));Instead of deeply nested widgets.
The goal isn’t to hide Flutter but to make layout composition fluent, readable, and fun again.
Why Flumpose?
Fluent, chainable syntax for widgets
Performance-minded (avoids unnecessary rebuilds)
Const-safe where possible, i.e, it can replace existing nested widgets using const.
Lightweight: no magic or build-time tricks
Backed by real-world benchmarks to validate its performance claims
Comes with detailed documentation and practical examples because clarity matters to the Flutter community
What I’d Love Feedback On
How’s the API feel? Natural or too verbose?
What other extensions or layout patterns would make it more useful in real projects?
Should it stay lean?
🔗 Try it out on https://pub.dev/packages/flumpose
2
u/mortenfriis Oct 14 '25
Looks amazing. Might actually replace exui for me. Despite my strong dislike of the name Flumpose (sorry, I don't know why, but I hate the name).
3
u/Plane_Trifle7368 Oct 15 '25
Thanks, means a lot that someone who hates the name and already using a similar package took time to evaluate it and found it at least somewhat beneficial enough to consider switching. it’s heavily inspired from compose, swiftui for flutter and naming kinda was the least gimmicky compared to initial drafts like flui, swiftposeui, composeX etc
2
2
2
u/mortenfriis Nov 15 '25
Hi, so I started using flumpose in one of my projects, and so far, it's really great. TBF, I'm only really using it for padding and styling text so far, but I plan on incorporating more flumpose functionality in my app. A couple of questions:
for text styling, can I safely chain methods now, without experiencing any performance impact (thanks to the internal _withStyle()), or do you still recommend using the .styled() extension?
are there any plans to add more extension methods in the future? I've seen the roadmap on the bottom of the pub.dev page, but there haven't been any updates to the project at all since you posted here a month ago. Did you choose to abandon it?
awesome_extensions and exui both have some great extensions, which will be difficult for me to go without (well, not that difficult, but I find my code much more readable when using extension methods). Some of my favorites are:
Awesome Extensions
Theme access (e.g. context.textTheme, context.backgroundColor, etc.)
BuildContext and Media Query (context.orientation, context.isPortrait, context.platformBrightness, context.showNavbar). flumpose have some of these, but you should take a look at everything you can do with AE's context methods here and here.
Navigation (context.push(SecondScreen()), context.pushNamed('/home'), etc.)
2
u/Plane_Trifle7368 Nov 15 '25
Hi u/mortenfriis, Glad to hear it's been great so far & happy to clarify how Flumpose works and what you can expect going forward.
About chaining text style methods
You can safely chain the text styling methods. The internal _withStyle() pattern is optimized to merge styles efficiently, so you won’t see a performance drop for typical UI usage. If your chains are long and repeated often in tight build loops, .styled() still gives you explicit control, but for most cases the chained methods are perfectly fine.About future extension methods
More extensions are planned as mentioned in the roadmap, which hasn’t changed. We recently released a new version about 5 days ago that introduces animation support. The goal is to avoid API churn and make sure any added extensions follow consistent naming and behavior conventions before publishing.About adding Awesome Extensions style helpers
The main constraint is deciding where the line is between convenience and bloat, and it is one of the requests that keeps coming up. The ideas you mentioned are on the shortlist, eg, Wider BuildContext helpers (orientation, brightness, insets, layout info), etc.
We might add them in opt-in modules so you can include only what you need, but still undecided.Hope this helps, and I really appreciate the detailed feedback.
7
u/gasolinemike Oct 13 '25
I can get behind this. I detest the present way of wrapping hierarchical widgets, making code awfully hard to read.
1
u/Plane_Trifle7368 Nov 11 '25
Thanks for all the feedback. Flumpose now also supports animation, as requested by many, eg :
Icons.favorite
.animatedIcon()
.iconColor(isActive ? Colors.red : Colors.grey)
.iconSize(isActive ? 48 : 32)
.animate(
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
),1
u/SpecialistServe3974 Oct 30 '25 edited Oct 30 '25
I suggest you don't brag about that performance gains because if you write raw flutter you can get the same performance by using const.
other than that, I like the idea and already seen some libs doing that, I hope flutter would go this direction as well..
Also, I think creating a codemod for that would be awesome.
1
u/Plane_Trifle7368 Oct 30 '25
Not bragging, just stating what you get out of the box as opposed to remembering to do so. What we noticed on some popular packages was that while we got the nice syntax, we often lost the ability to use const which is one of the reasons this package was developed.
Could you share more on codemod ?
Open to feedback1
u/SpecialistServe3974 Oct 30 '25
e.g
Foo( child: Bar(prop: 2), prop: 3 );can be converted with a codemod to
Bar(prop: 2).foo(prop: 3);using some conventions data about what widgets should be "flumped"..
5
1
1
u/OldHummer24 Oct 13 '25
Ngl this looks great, I will add it, my colleagues might hate me for it xD
0
u/Plane_Trifle7368 Oct 13 '25
They’ll forgive you when you approve their next pull request without comments 🤣
1
u/Working-Cat2472 Oct 14 '25 edited Oct 14 '25
splendid, good job. i always hated it how awfully verbose the flutter code is. Let' see, if i can apply that in my own project which is a wysiwyg ui editor and runtime engine. Speaking of which :-) As i am not a Flutter expert, i would need some advice regarding the definition of widget properties, ( e.g. where does padding belong and the handling of the different platforms. Could we have a talk maybe?
Thanks, Andreas
2
u/Plane_Trifle7368 Oct 15 '25
Thanks a lot. feel free to pm regarding integrating this in your project
1
1
u/YosefHeyPlay Oct 14 '25
Whats the difference between the existing "exui" package?
0
u/Plane_Trifle7368 Oct 14 '25
At first glance, I’d say Flumpose’s approach is more performance-first, focusing on const-safety, reduced widget allocations, and clean composability (see a few extracts in the table below).
ExUI, while definitely impressive and worth exploring, seems to fall closer to the family of other widget extension libraries. It offers a huge number of helper methods that often combine common useCases (subjective) which is great for quick prototyping but also results in quite a few similar utilities (e.g. shapedBox vs circularBorderBox). That makes it feel more like a toolkit, something that really shines when building complex widgets quickly using one of its many prebuilt combinations.
I’m genuinely impressed by its API coverage and I’m curious to see what I can learn from it or improve upon for Flumpose.
PS: Have you used/use exui ? Would be interested in profiling results if any.
Feature Flumpose Other Widget Extensions Const-optimized ✅ 85% reduction ❌ DecorationBuilder ✅ Single Container ❌ Nested wrappers Text optimization ✅ Style accumulation ❌ Multiple Text widgets Memory efficient ✅ 2.4MB → 0.35MB ❌ Standard allocations
2
u/Dismal-Fruit9382 Oct 17 '25
pretty good, that means no more nested widgets for small UI changes. i'll take a look on it
1
1
1
0
Oct 13 '25
[deleted]
2
11
u/eibaan Oct 13 '25
You picked that one example that will not work, as
Colorsis a different type thanColor. Something likeAlign(alignment: .center)should work, though.6
u/_fresh_basil_ Oct 14 '25 edited Oct 14 '25
Why would Align work with Alignment, but Color not work with Colors? Care to elaborate? (Or have an article or something I can read?)
Edit: I was able to find the answer and understand what you meant.
It's because the member (.blue) needs to be static on the type the parameter is expecting. Because the parameter type is "Color" the static member would need to be on the Color class, not the Colors class.
5
6
u/frdev49 Oct 14 '25 edited Oct 14 '25
"where possible" and "can replace" matters in "Const-safe where possible, i.e, it can replace existing nested widgets using const." Like this lazy dumb example:
- MaterialApp parent widget can be const
- But it cannot be const anymore, because this is using a method to return a widget
So I guess it will matter how tree is organized to get the benefits.
Still, interesting benchmarks which show that by using const and chaining in a smart way you can optimize your app 👍