Summary
We studied three major state management approaches in this chapter – the GetX package, the GetIt package, and Binder.
GetX is well-known for abstracting out all the core state management boilerplate code and giving the developer the ease of using readable and maintainable code. GetX uses the GetBuilder
widget, the GetMaterialApp
widget, and the GetxController
class to connect code together. GetX is also very handy for neatly managing navigations in your application.
GetIt uses the ChangeNotifier
class to reflect changes to the UI. It also uses dependency injection to make all the model classes available to the whole application. It uses the basic setState
function to update the UI.
Binder uses scopes, state references, and view logic classes to manage states inside a Flutter application. It uses the LogicRef
class to inject scope
inside the ViewLogic
class and the StateRef
class to manage the latest values of your model classes.
The next three chapters are...