@AllanKilic Peut-être parce qu’un film est sensé raconter quelque chose ?
C’est moi qui assiste à une hallucination, « scénario très convenu, personnages pas développés, dialogues pas mémorables, scènes ridicules » mais l’actrice joue bien et certains plans sont bien foutus donc c’est ok?
@ASalvadorini I totally get the FSM point, and it makes sense conceptually.
From a practical standpoint though, one-off effects don’t break the FSM—they’re just transient events emitted by the controller.
It’s simpler and less hacky than “consuming” state flags for things like snackbars.
@ASalvadorini Both perspectives are valid (to me) 👍
I’ve been doing what you’re arguing for years, but after all that time, I feel it’s more dogmatic than pragmatic. One-off side effects are just easier to process without the need to be consumed.
@ASalvadorini That’s exactly why I prefer relying on one-off side effects. The UI shouldn’t have to tell your notifier/controller that the state has been “consumed.” Consuming the error so the snackbar won’t show on rebuild is a “hack”—it doesn’t change the fact that the state is still error.
@ASalvadorini I’m talking about one-off side effects. How would you implement them with your minimal approach?
Let’s say the boring/basic case: showing an error snackbar if an async operation fails?
@ASalvadorini I’m thankful to all the authors of these state-management packages—they’re great for learning the concepts and seeing different implementations, but once you understand them, building your own unbranded, pragmatic solution gives you full control and no dependencies
@ASalvadorini That’s why I think it’s bad practice to rely on a package just to wrap a simple ChangeNotifier—something you can implement in a few LOC, avoiding a branded dependency leaking through your entire UI layer.
@ASalvadorini And I’d be missing an effect mechanism that can be emitted from the state-controlling class and listened to by the UI.
So I would add:
EffectMixin
EffectListener
@luke_pighetti BLoC may not be the best but Cubit is pretty much all you need if you want a packaged/documented state management solution and you are to lazy or inexperienced to build a simple friendly wrapper above ChangeNotifier…
@yorgohoebeke@ASalvadorini Never understood why a developer would use a full framework like riverpod with annotations and code generation just to rebuild widgets on state changes… 😅