Chapter 8. Flutter state management

 

This chapter covers

  • StatefulWidget and the state object
  • Widget tree vs. element tree
  • State object lifecycle
  • InheritedWidget and blocs for state management
  • Introduction to streams and async Dart

This chapter is going to be my favorite for two reasons: first, there isn’t one approach to state management (in Flutter or elsewhere). There are many different state management patterns, and all developers have opinions about each of them. And second, developers (including myself) are ... passionate ... about their opinions.

With that in mind, I won’t be able to do a deep dive on every state management pattern that’s popular right now. I thought a lot about which patterns I should cover, and I came up with this two-pronged litmus test to decide:

  1. Will it help you expand your Flutter and Dart skills?
  2. Is it unopinionated enough that its concepts can be applied elsewhere?

This is what I came up with for this chapter in general:

8.1. Deep dive into StatefulWidgets

 
 
 

8.1.1. The widget tree and the element tree

 
 
 

8.1.2. The StatefulWidget lifecycle and when to do what

 

8.2. Pure Flutter state management: The InheritedWidget

 
 

8.2.1. Creating a Central Store wth an InheritedWidget/StatefulWidget team

 
 
 

8.2.2. The inheritFromWidgetOfExactType and of methods

 
 
 

8.2.3. Use the of method to lift up state

 
 

8.2.4. State management patterns beyond Flutter

 
 
 

8.3. Blocs: Business Logic Components

 
 
 

8.3.1. How do blocs work?

 
 
 
 

8.3.2. Implementing the bloc architecture

 
 

8.3.3. Intro to streams and async Dart

 
 

8.3.4. Implementing streams in the CartBloc

 
 
 

Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest