Book Image

Managing State in Flutter Pragmatically

By : RAHUL AGARWAL, Waleed Arshad
Book Image

Managing State in Flutter Pragmatically

By: RAHUL AGARWAL, Waleed Arshad

Overview of this book

Flutter is a cross-platform user interface (UI) toolkit that enables developers to create beautiful native applications for mobile, desktop, and the web with a single codebase. State management in Flutter is one of the most crucial and complex topics within Flutter, with a wide array of approaches available that can make it easy to get lost due to information overload. Managing State in Flutter Pragmatically is a definitive guide to starting out with Flutter and learning about state management, helping developers with some experience of state management to choose the most appropriate solutions and techniques to use. The book takes a hands-on approach and begins by covering the basics of Flutter state management before exploring how to build and manipulate a shopping cart app using popular approaches such as BLoC/Cubit, Provider, MobX, and Riverpod. Throughout the book, you'll also learn how to adopt approaches from React such as Redux and all its types. By the end of this Flutter book, you'll have gained a holistic view of all the state management approaches in Flutter, and learned which approach is the best solution for managing state in your app development journey.
Table of Contents (14 chapters)
1
Section 1:The Basics of State Management
4
Section 2:Types, Techniques, and Approaches
8
Section 3:Code-Level Implementation

Summary

This marks the end of our cart application building using all the techniques discussed in the book. In this chapter, specifically, we used observables in GetX to make our class objects automatically update, we used GetIt to update our app's state without using BuildContext, and we took a thorough look into how to bind the UI with reference variables and a view logic class using Binder to update the app's state.

You should now be able to create Flutter apps using the different state management techniques discussed in this chapter and the previous ones. You should be able to differentiate between ways to manage the application's state using different techniques. You might not be able to remember everything about the techniques, but that's nothing to worry about; you don't need to memorize everything. Practice will clear the fog!

In the next and final chapter of the book, we will discuss some potential ways to decide which technique you should use...