State Management in Flutter using ChangeNotifier - Roman Just Codes (S1E11)

preview_player
Показать описание
In this episode I’ll be covering more on state management in flutter, this time dealing with the ChangeNotifier class, the ChangeNotifierProvider Widget, and the Consumer widget, while implementing the feature of adding items to a mobile shopping cart.

Previous Episode

GitHub Repo for this project:

Flutter packages used:

00:00 - Intro
00:37 - What we’ll create
01:39 - Creating the CartItem Model
02:47 - Creating the CartService service
03:54 - Adding the ChangeNotifierProvider widget
04:41 - Using the Consumer widget to listen to changes
06:00 - Triggering changes to occur in your ChangeNotifier service
08:37 - Refactoring other widgets to use the Consumer widget
14:55 - Refactored the way the notifylisteners gets triggered
16:43 - Next Steps

#Flutter​​ #Firebase #GoogleSignIn #FirebaseAuth #Authentication #Dart​​ #RomanJustCodes​​ #CrossPlatform​​ #Android​​ #IOS​​ #Web​​ #Desktop​ #Widgets​ #FlutterChangeNotifier #FlutterProvider
Рекомендации по теме
Комментарии
Автор

Can we link python script for flutter as backend app because python Can Do anything

GameDevForLife
Автор

Hey Roman, loving the content, nice keep it up!!

I have a question about the change notifier provider, in your videos you rebuild which I assume causes the main.dart to run again and thus creating the providers again and clearing any state they might hold, such as the cart info. However if you logout and log back in will those providers still have the same state? If so, how do you clear them on logout.

yageshrin
Автор

Thank you for your videos, but your videos are too fast... It will be hard for people to get most of your explanations, try and make more explanatory tutorial videos rather than doing a fast video.. Just my suggestion

ayodejioladoyin