State Management Flutter.
Areeba Farooq
Posted on June 29, 2022
State management is an essential part of any app development. In the picture below, you can see some well-known state management solutions provided for the Flutter application.
I do not want to argue with anyone about which one is the best or which is the worst. If you know how to use & maintain any one of the state management packages, then just use them. All of them are easy to learn & use, but maintaining the same state-management package throughout the application is challenging. So, simply go through through the documentation once before deciding to use it in your application.
Flutter State Management:
- SetState
- Provider
- BloC
- Getz
- MobX
- Redux
- fish_redux
Many flutter developers asked me, also faced this same question in the interviews: which packages do I use for managing my app state?
My answer is always the same: “It depends on the type of application I am working on. For 2–3 page applications (e.g. games, Edu app, etc.), I use setState & provider. And for large-scale applications, (e.g. e-commerce, crypto app, etc.), I use setState & bloc”.
Here is a simple game developed using the “provider” state-management package:
Flutter Puzzle Hack
And this repo is an example of bloc state management:
Flutter BloC
Now, I hope flutter developers will stop searching for the best state management solution & focus on application development.
Support Me:
Posted on June 29, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
February 6, 2023