Flutter Navigator 2.0

Nov 8 2022 · Dart 2.17.3, Flutter 3.0.2, Android Studio 2020.3

Part 2: Deep Dive Into Navigator 2.0

07. Use the New App State

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 06. Create a Book Manager Class Next episode: 08. Create the Router Delegate

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Transcript: 07. Use the New App State

Episode 7 - Using The New App State

Open main.dart file in our lib folder. This has the main method and is the staring point of our application. locate the todo comment TODO: Initialise App State Manager and Initialise our app state manager with final keyword as follows.

final _appStatemanager = AppStateManager();

Now we have to wrap our MaterialApp with MultiProvider so that we can pass multiple providers before the root of the app is build. And we create an instance of our provider. So pass

ChangeNotifierProvider(create: (context) => _appStateManager);

in the providers array where we can pass multiple passwords.