Chapter 3: Diving into Advanced State Management Approaches
In the previous chapter, we learned how to create optimized screens that rebuild only the widgets required for user interaction. We also learned about two of the most basic and core implementations of state management techniques, which are setState
and InheritedWidget
.
In this chapter, we will study the two most popular state management techniques, which are Provider and BLoC, and their slight variations, Riverpod and Cubit, which make things easier for the developer. We will look at the following:
- Provider – an easier implementation of
InheritedWidget
- Riverpod – a much easier version of Provider
- BLoC – business logic component
- Cubit – simplified BLoC
During your Flutter development journey, you are most likely going to use one of these techniques to build a state management solution for your application. So, it is highly recommended you understand each one of them...