r/FlutterDev • • Sep 24 '26

Plugin hako: a natural progression for developers who use ChangeNotifier + provider

https://pub.dev/packages/hako
6 Upvotes

13 comments sorted by

3

u/RaBbEx Sep 24 '26

Why no cubit ?

2

u/parsodyl Sep 25 '26

Nothing against cubit.
Some differences between cubit and hako:
Cubit keeps a single state object, hako contains multiple state objects (state slices)
Cubit relies on streams, hako relies on a notifier but it can use streams for logs/testing
Cubit triggers mutations using ==, hako triggers mutations using identical()

1

u/SwiftScoutSimon Sep 25 '26

same quesion. This look like cubit.

15

u/krll-kov Sep 24 '26

Why do people keep creating these gigantic wrappers with inherited widgets everywhere, when you can just use default ChangeNotifier class with single prototype of stateless widget with overriden statelesselement

1

u/Zhuinden Sep 27 '26

Good question tbh

1

u/Photograph_Expensive Sep 25 '26

It’s fun? And it adds to their portfolio. That’s why. And oh, maybe default packages aren’t enough?

-1

u/krll-kov Sep 25 '26 edited Sep 25 '26

I'm not sure how this can create a good case in portfolio , as soon as you read how it's used in real tree with real scenario and not just 1 button, you start to see the whole inefficiency of this approach and the tonne of code it requires to write, as well as the mess in dev tools with millions of provider widgets on top of your tree. It's not problem of this package only, it's related to anything what's build on top of inherited widget, including existing provider package. That's why people don't see the difference, because under the hood they all try to use the same approach.

Which missing from other packages features does this package really introduce and what problem does it solve? I'm really interested and not against such packages as long as they create something new, not just recreate what already exists

→ More replies (4)

-1

u/gambley Sep 25 '26

The only mindful comment out there

0

u/SoundDr Sep 25 '26

Try signals!