Most popular Flutter state management libraries in 2022
Tags: flutter, dart
Published: 2022-01-01 01:37:05

Edit: After one year I released new updated article here:
{% link https://dev.to/mjablecnik/most-popular-flutter-state-management-libraries-in-2023-amc %}
<br>

Flutter is only toolkit which focus mainly into how to show your Statefull or Stateless widgets but doesn't solve a lot of problems with state management or architecture design of your application like some other frameworks.

You are very free in how you will manage states and community around Flutter bring a lot of solutions how to do it.

But many new developers can be confused too large choose of different packages solving state management problems so I decided to make this overview of the most popular Flutter state management packages with small description about them.

I hope that you gain good overview about all packages which exists and will be helpful for choose right solution for you.

---

## Bloc
Bloc is probably the most popular state management solution which learn you also architectural pattern: Presentation, Bussiness Logic, Data (Repository, Provider)

**Pros:**
+ Easy for separate presentation from business logic
+ Great documentation with many examples
+ Dependency injection: Uses Provider internally to make it easy provide and access blocs throughout the widget tree.
+ Can persist and restore states
+ Support for undo and redo states
+ Widely used by Flutter community
+ Active development with many sponsors

**Cons:**
- Maybe hard to understand for new developers
- Too many boilerplate code 

**Popularity:**
GitHub: 8282 stars
Pub.dev: 1400 likes

**Links:** 
Official Page: https://bloclibrary.dev
Documentation: https://bloclibrary.dev/#/gettingstarted
Github: https://github.com/felangel/bloc

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlqxmmc6fgkk34fflw30.png) 

---

## GetX
GetX is second most popular state management solution and very fast growing in popularity. Is also the most controversional and evoking conflicts in Flutter developer community because many developers hate this package due to antipatterns, bad testability or documentation, but many developers also love it due to simplicity and very short code which you write so then you feel more productive.

I found some interesting opinions about this package in Reddit so you can make your own opinion: [Opinion 1](https://www.reddit.com/r/FlutterDev/comments/po1bei/why_is_getx_such_a_bad_state_management/), [Opinion 2](https://www.reddit.com/r/FlutterDev/comments/kr2ld4/do_you_really_use_getx_to_build_flutter_app/gi82ihe/?utm_source=reddit&utm_medium=web2x&context=3), [Opinion 3](https://www.reddit.com/r/FlutterDev/comments/kr2ld4/do_you_really_use_getx_to_build_flutter_app/gi7n987/?utm_source=reddit&utm_medium=web2x&context=3)

And here is discussion between author of GetX and authors of other state management solutions (Bloc and Provider) which probably cause many hates in Flutter community against GetX: 
https://github.com/jonataslaw/getx/issues/243


**Pros:**
+ Very simple for new Flutter developers
+ Very short code
+ Big popularity
+ Solving also dependency injection

**Cons:**
- Package is solving too many things => Vendor lock into only one big package
- Without any sponsors => When author stop support of this package so you can rewrite whole your app from scratch
- Too big package which have too many issues
- Development isn't very active
- When you find some issue you can wait too very long time for fix
- Bad reputation in Flutter community
- Documentation is not actual

**Popularity:**
GitHub: 5687 stars
Pub.dev: 7479 likes

**Links:** 
Official page: Only GitHub and Pub.dev
Documentation: Only Github README
Github: https://github.com/jonataslaw/getx

**Development activity:**

![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8v1c1ipr4yl2n6iw7d0w.png)
 
---

## States_Rebuilder
States_Rebuilder is Flutter state management combined with a dependency injection solution and integrated router. 
I didn't tried a lot this package but when I see into documentation so I feel that author want to do too much things in one package (similar like GetX) instead of focus only into state management solution..                                                                   
Package solve also: 
internationalization, form validation, authentication, server queries, etc..


**Pros:**
+ Separate presentation from business logic
+ Can persist and restore states
+ Support for undo and redo states
+ Built-in dependency injection system
+ Development is active

**Cons:**
- Is doing too much things (not only state management)
- Only one maintainer without sponsors
- Not so popular (Isn't widely used) 


**Popularity:**
GitHub: 442 stars
Pub.dev: 332 likes

**Links:** 
Official page: Only GitHub and Pub.dev
Documentation: https://github.com/GIfatahTH/states_rebuilder/tree/master/states_rebuilder_package#readme
Github: https://github.com/GIfatahTH/states_rebuilder

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drg5zb5yonj0r342385s.png)
 
---

## Provider
Provider is a wrapper around [InheritedWidget](https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html) for make it easier and simple use. This package is good for anybody who want to manage data with InheritedWidget but in more simple way. 
Provider is also used internally in Bloc package for provide and access bloc objects in widget tree and can be used also with: Triple, ValueNotifier, ChangeNotifier or other state objects. 


**Pros:**
+ Make InheritedWidget more simple 
+ Widely used and popular
+ Supported by Flutter team  

**Cons:**
- Some problems which are solved in Riverpod


**Popularity:**
GitHub: 4007 stars
Pub.dev: 5734 likes

**Links:** 
Official page: Only GitHub and Pub.dev
Documentation: Only Github README
Github: https://github.com/rrousselGit/provider

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vndhylmlpyapsnbew1ku.png)
 
---

## Riverpod
Riverpod is from same author as Provider and it is a reimplementation of [InheritedWidgets](https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html) from scratch because during development of Provider author was faced with some problems which removed in Riverpod.


**Pros:**
+ Simple
+ Similar to Provider

**Cons:**
- Isn't widely used 
- Is not so mature as Provider => Recently left its experimental status
- Isn't fully stable yet
- Can be used in production but with caution (more info here: https://github.com/rrousselGit/river_pod#is-it-safe-to-use-in-production) 


**Popularity:**
GitHub: 2289 stars
Pub.dev: 1282 likes

**Links:** 
Official page: https://riverpod.dev
Documentation: https://riverpod.dev/docs/getting_started
Github: https://github.com/rrousselGit/river_pod

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gteereow4fqe28eazeu.png)
 
---

## Modular + Triple
Modular and Triple are 2 different packages but work great with together.
These packages (and many others) are developed by Flutterando Community which is huge Flutter community from Brasil.
Triple is simple package for manage your state by Segmented State Pattern and Modular provide DI and Routing with [modular project structure](https://dev.to/mjablecnik/flutter-modular-architecture-2f15).

**Pros:**
+ Very simple development without boilerplate code  
+ Developed by community of developers
+ Separate presentation from business logic
+ Can persist and restore states
+ Support for undo and redo states
+ Very nice dependency injection with Modular
+ Very nice documentation
+ Triple is one simple package so you can use it also without Modular

**Cons:**
- Triple is only one year old so it isn't known yet a lot.


**Popularity of Modular:**
GitHub: 1015 stars
Pub.dev: 789 likes

**Popularity of Triple:**
GitHub: 87 stars
Pub.dev: 63 likes

**Links for Modular:** 
Official page: https://modular.flutterando.com.br
Documentation: https://modular.flutterando.com.br/docs/intro
Github: https://github.com/Flutterando/modular

**Links for Triple:** 
Official page: https://triple.flutterando.com.br
Documentation: https://triple.flutterando.com.br/docs/intro
Github: https://github.com/Flutterando/triple_pattern

**Development activity for Modular:**
![Development activity for Modular](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ow4xi7ygn26hzj90b857.png)
 
**Development activity for Triple:**
![Development activity for Triple](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d34hubnjjqsne0ibef7a.png)
 
---

## GoRouter + GetIt + Triple
If you don't like Modular or you don't want to be dependent on library which is doing 2 different things. So this is good alternative combination I think. 
Triple you know from previous point and GoRouter with GetIt are doing almost same things like Modular.
This combination is good if you don't want to be depending only on one big package maintained by only one developer (like GetX or States_Rebuilder).
But you have 3 different nice things developed from different developers and anyone from these packages can be changed anytime with some alternative.


**Pros:**
+ Very simple development without boilerplate code  
+ Developed by more different developers
+ Separate presentation from business logic
+ Can persist and restore states
+ Support for undo and redo states
+ GoRouter and GetIt make same nice things like Modular
+ GetIt is quite popular alternative for Provider

**Cons:**
- Triple and GoRouter are only one year old so they aren't known yet a lot.

**Popularity of GoRouter:**
GitHub: 274 stars
Pub.dev: 442 likes

**Popularity of GetIt:**
GitHub: 833 stars
Pub.dev: 1742 likes


**Links for GoRouter:** 
Official page: https://gorouter.dev
Documentation: https://gorouter.dev/getting-started
Github: https://github.com/csells/go_router

**Links for GetIt:** 
Official page: Only GitHub and Pub.dev
Documentation: Only GitHub README
Github: https://github.com/fluttercommunity/get_it


**Development activity for GoRouter:**
![Development activity for GoRouter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/be0134czrj2vwup3kczc.png)
 
**Development activity for GetIt:**
![Development activity GetIt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ocsu6nji6cvy5swbp2vf.png)
 
---

## Cube
If you are fan of GetX so probably you will like also this package because it is very similar to GetX state management. I am very curious if author of Cube will also want to create some big framework similar as author of GetX or not. :-) 
Cubes doesn't rely on RxDart but use of ChangeNotifier because it is a feature already available in Flutter.

**Pros:**
+ Very simple for new users
+ [Have some interesting features which GetX doesn't have](https://github.com/RafaelBarbosatec/cube/issues/49)
+ Author doesn't have a bad reputation

**Cons:**
- Young project (It is not known yet)

**Popularity:**
GitHub: 12 stars
Pub.dev: 19 likes

**Links:** 
Official page: Only GitHub and Pub.dev
Documentation: Only Github README
Github: https://github.com/RafaelBarbosatec/cube
Pub.dev: https://pub.dev/packages/cubes

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmepru67yutdir67mh60.png)
 
---

## Meedu
Meedu is very interesting young project. In one package solves: State Management which is very similar to Riverpod, Dependency Injection which is very similar to DI from GetX and contains also Reactive programming which is very similar like State management in GetX.
So if you like Riverpod and GetX DI this package is right for you ;-) 


**Pros:**
+ Simple as Riverpod
+ Simple DI like in GetX

**Cons:**
- Very young project
- Router module doesn't support Navigator 2.0 

**Popularity:**
GitHub: 17 stars
Pub.dev: 61 likes

**Links:** 
Official page: https://flutter.meedu.app
Documentation: https://flutter.meedu.app/docs/5.x.x/intro
Github: https://github.com/darwin-morocho/flutter-meedu

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g42ni8srauh43y0yb81e.png)
 
---

## MobX
MobX is a state-management library that makes it simple to connect the reactive data of your application with the UI. This wiring is completely automatic and feels very natural. As the application-developer, you focus purely on what reactive-data needs to be consumed in the UI without worrying about keeping the two in sync.

**Pros:**
+ Very simple
+ Nice for begginers
+ Have some sponzors
+ Without boilerplate code

**Cons:**
- You have to rebuild code after every change
- Developer activity looks very poor

**Popularity:**
GitHub: 2051 stars
Pub.dev: 758 likes

**Links:** 
Official page: https://mobx.netlify.app
Documentation: https://mobx.netlify.app/getting-started
Github: https://github.com/mobxjs/mobx.dart

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmo93pcgjf1wh17zggvl.png)
 
---

## Redux
Probably good choice for somebody who know Redux from React world. But this version for Dart seems that is not very popular, doesn't any good documentation and development is also very low. (Last update was 10 months ago)


**Pros:**
+ Maybe good for somebody who already know Redux

**Cons:**
- I didn't found any good documentation
- Low development
- Not very used in Flutter community
- Last commit is old for 10 months 

**Popularity:**
GitHub: 1527 stars
Pub.dev: 330 likes

**Links:** 
Official page: Only GitHub and Pub.dev
Documentation: Only Github README
Github: https://github.com/brianegan/flutter_redux

**Development activity:**
![Development activity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urgu7glwcmcd63w42ra1.png)
 
---

Packages which you can find but development is in too early stage:
- [Bolter](https://github.com/Renesanse/bolter_flutter/graphs/contributors)


Packages which you can find but development is not so active:
- [Fish Redux](https://github.com/alibaba/fish-redux/graphs/contributors)
- [Binder](https://github.com/letsar/binder/graphs/contributors)
- [flutter_command](https://github.com/escamoteur/flutter_command/graphs/contributors)
- [Okito](https://github.com/ragokan/okito/graphs/contributors)
- [Momentum](https://github.com/xamantra/momentum/graphs/contributors)

---

## Conclusion
I tried many various solutions and I had some bad or very bad experiences with some solutions.  
Here are some my personal short opinions about every solutions which I described here. You can agree with me or not:

<table>
<tr><td>Bloc</td><td>Quite good, but for somebody it can be too complex or too boilerplate code</td></tr>
<tr><td>GetX</td><td>For somebody it can be too controversional and too many bugs in one package with incomplete docs </td></tr>
<tr><td>Provider</td><td>I am not sure if use Provider or Riverpod </td></tr>
<tr><td>RiverPod</td><td>I am not sure if this is really ready for production </td></tr>
<tr><td>States_Rebuilder</td><td>Too much things in one package like GetX</td></tr>
<tr><td>Modular + Triple</td><td>Very nice solution and I didn't find any problems yet after half year of usage</td></tr>
<tr><td>GoRouter + GetIt + Triple</td><td>Very nice alternative for previous solution, but I didn't tried it yet</td></tr>
<tr><td>MobX</td><td>Very nice solution but package is finding maintainer and I am not sure about future of this project</td></tr>
<tr><td>Redux</td><td>I feel that this package is already abandoned</td></tr>
<tr><td>Cube</td><td>Package is in too early stage and I am not sure if development will be also active in the future</td></tr>
<tr><td>Meedu</td><td>Package is in too early stage and I am not sure if development will be also active in the future</td></tr>
<tr><td>Bolter</td><td>Package is in too early stage</td></tr>
</table>

Thank you very much for read this my long overview and if this article is useful for you, let me know it by give a like or some comments below. ;-)