Minimal


I just published Minimal, a minimal state management package for Flutter Architecture Components, based on the MVN (Model-View-Notifier) pattern.
MVN neologism by Roman Jaquez.
Thanks to NXT:FWD, as I could use one entire #myDay to try this out

It comes with a runnable example:

  • The classical counter app demonstrates basic state management. This shows off non disposable and disposable notifiers
  • A morphing widget. This shows off two views using the same notifier, autodispose, and state selection



Here I ported my Flutter Architecture Components playground demo app from using Riverpod to using Minimal, in case someone would be interested in a real life app example and code snippets



1 Create an immutable UI state














2 Create a notifier to hold your UI state













3 Rebuild the UI when state changes













4 Access the notifier upon user's actions








Bonus and optional, to optimize rebuilds
3.2 (Optimized) Rebuild the UI only when part of the state changes


Comments