Mobile Development 14 min read

Choosing a Flutter State Management Framework: Provider, Riverpod, BLoC, GetX and Others

This article guides beginners through the crowded landscape of Flutter state‑management solutions, comparing Provider, Riverpod, BLoC, flutter_redux, fish_redux, GetX and others, while showing that integration size impact is negligible and emphasizing that the final choice should match project needs and maintenance considerations.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Choosing a Flutter State Management Framework: Provider, Riverpod, BLoC, GetX and Others

This is the sixth article in the "Flutter Engineering Framework Selection" series, aimed at newcomers who need a quick guide on how to choose suitable modules when building a Flutter project.

State management is a perennial topic in Flutter; fundamentally it is a wrapper around setState , and the various frameworks exist to make sharing state and triggering setState more elegant.

Since Flutter’s debut, dozens of state‑management packages have appeared, including scoped_model , BLoC , Provider , flutter_redux , MobX , fish_redux , Riverpod , GetX and others, which can overwhelm developers and cause decision‑paralysis.

The impact on app size is usually trivial—often smaller than a single PNG image. If you care about size, you can run the following command to generate an analysis file: flutter build apk --target-platform android-arm64 --analyze-size After execution, an apk-code-size-analysis_01.json file is created under /Users/your‑username/.flutter-devtools/ . Open Flutter DevTools → App Size Tool to inspect the differences.

Provider (officially recommended since Google I/O 2019) is simple, wraps InheritedWidget , and works with ChangeNotifier , Stream , Future and Consumer* to control refresh granularity. Advantages: easy to maintain, concise API, official support. Drawbacks: tightly coupled to Flutter widgets and requires a BuildContext .

Riverpod was created by the same author to overcome Provider’s limitations. It allows global providers without depending on BuildContext , uses WidgetRef as a replacement for BuildContext , and offers compile‑time safety and better nesting handling. Advantages: more flexible, context‑free, compile‑time safety, global definitions. Drawbacks: more complex API and higher learning curve.

BLoC is an early, event‑driven solution built on Stream and Provider . It excels at separating events from UI and enables sophisticated state interception, but it requires more boilerplate and can slow development.

flutter_redux and fish_redux bring Redux concepts to Flutter. Actions flow through middleware and reducer , providing clear separation of business logic and UI, which is useful for large teams. However, they demand a lot of boilerplate and feel less idiomatic to Flutter. BlocSelector<BlocA, BlocAState, SelectedState>( selector: (state) { /* return selected state */ }, builder: (context, state) { /* build widget */ }, ) MultiBlocListener( listeners: [ BlocListener<BlocA, BlocAState>(listener: (context, state) {}), BlocListener<BlocB, BlocBState>(listener: (context, state) {}), BlocListener<BlocC, BlocCState>(listener: (context, state) {}), ], child: ChildA(), )

GetX has become a de‑facto “Swiss‑army‑knife” for Flutter, offering state management, routing, internationalization, HTTP, reactive streams, and many extensions. It removes the need for BuildContext in most operations (e.g., Get.put , Get.find , Get.to ) and provides shortcuts like var count = 0.obs and Obx(() => Text("${controller.name}")) . While it dramatically speeds up development, its heavy reliance on hidden “magic” can obscure Flutter fundamentals and make debugging harder.

Another state‑management library mentioned is MobX , which shares GetX’s implicit‑dependency style but focuses solely on state.

In conclusion, the choice of a state‑management framework should be driven by the specific requirements, team familiarity, and long‑term maintenance prospects. Size differences are negligible, and every solution has trade‑offs; the most important factor is whether the library will continue to be maintained or can be sustained by your own team.

flutterstate-managementProviderRiverpodGetXBLoC
Rare Earth Juejin Tech Community
Written by

Rare Earth Juejin Tech Community

Juejin, a tech community that helps developers grow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.