There are several ways to manage state in Flutter. My personal favorite is a package called Provider. It allows you to inject the state into a widget and its children. This video will explain how to selectively rebuild widgets in a widget tree using the Provider, Consumer, and Selector classes. There is a lot more that isn't covered in this video, but this should get you comfortable with basics of the Provider package.
*Error around 14:50. I meant "enclosing widget", not "surrounding widget"
00:40 Reviewing the code of the small test app I created without using Provider 02:11 Creating the first ChangeNotifier class (FoodNotifier) 04:25 Using ChangeNotifierProvider to register the FoodNotifier 05:34 Refactoring the home page to use the FoodNotifier 08:30 Showing the FoodNotifier list in the list page 10:27 Creating a 2nd Change Notifier (UserNotifier) 12:26 Using MultiProvider for multiple providers 14:00 Adding the UserNotifier to the List page 18:02 Using the Consumer widget 20:37 Explaining the very important 'listen' flag 21:42 Using the Selector widget 25:03 Using both the Consumer and Selector with the same ChangeNotifier
Get the Code:
Connect on Facebook :
Connect on Twitter:
How to manage state in Flutter,flutter provider tutorial,how to setup provider in flutter,how to create multiple providers in flutter,flutter multiprovider,flutter selector widget,flutter consumer widget,flutter consumer state,flutter changenotifier provider,flutter provider listen flag,how to save state in flutter,flutter provider package example,flutter handling multiple providers,flutter app development tutorial,flutter tutorial videos,
0 Comments