Skip to content

Latest commit

 

History

History
28 lines (14 loc) · 1.21 KB

File metadata and controls

28 lines (14 loc) · 1.21 KB

Flutter State Management - The Grand Tour

source: Fireship Youtube Channel; code examples

  • StatefulWidget, managing simple few states in a widget

  • StatefulBuilder, manage StatefulWidget simply from a StatelessWidget with builder for local state

  • StreamBuilder, doc

  • InheritedWidget, to share data from child to parent or sibling to sibling

  • RxDart + BehaviorSubject, they always have a current value; are streamable, controllable, transformable and shareable; independent of Widget Tree; using with get_it allows better usability as singleton

  • BLoC, similar to Redux for React and flutter_bloc is a decent lib to use it

  • Redux, flutter_redux Dart version of defacto from React

  • Mobx, provides few more abstractions on redux removing bunch of boilerplate

  • Scoped Model, to avoid heavy BLoC approach and just manage some state easily

  • Flutter Hooks, similar to React Hooks

  • Firebase, if need state management with bunch of extra features