A List of state management approaches in Flutter

Mo Malaka
Flutter Community
Published in
2 min readJun 22, 2022
Photo by Kelly Sikkema on Unsplash

State management is a complex topic. It is one of the most important processes in the life cycle of an application. In Flutter State is whatever data you need in order to rebuild your UI at any moment in time. When this data change, it will trigger a redraw of the user interface.

Here is a list of the most popular packages used for state management in Flutter:

🌟 setState:

The low-level approach to use for widget-specific, ephemeral state. You can simply use Statefulwidget and setState() method to get state.

🌟 InheritedWidget & InheritedModel:

Another low-level approach used to communicate between ancestors and children in the widget tree.

🌟 Provider:

A wrapper around InheritedWidgets to make them more reusable and easy to use.

🌟 Riverpod:

Reactive State-Management and Dependency Injection Framework with no dependency on Flutter.

🌟 BLoC:

BloC makes it easy to implement the Business Logic Component design pattern, which separates presentation from business logic.

🌟 GetIt:

A service locator-based state management approach that doesn’t need a BuildContext.

🌟 Mobx:

MobX is a state-management library based on observables and reactions.

🌟 GetX:

A simplified reactive state management solution.

Let me know which approach is your favorite!

Thank you. 👋🏻

Follow me on Twitter for more tips about #coding, #learning, #technology… etc.

Check my channel on YouTube

Check my Apps on Google Play & Apple Store

--

--

Mo Malaka
Flutter Community

Solutions Architect @aws-amplify | Lifelong Learner | Opinions are my own