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

Опубликовано: 04 Октябрь 2024
на канале: Roman Just Codes
2,210
57

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
   • State Management in Flutter using Mul...  

GitHub Repo for this project:
https://github.com/romanejaquez/orill...

Flutter packages used:
Flutter Provider - https://pub.dev/packages/provider

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