Flutter Navigator 2.0

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

Part 3: Use the Navigation

13. Navigate to the Home Page

Episode complete

Play next episode

Next
Save for later
About this episode
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 12. Display the Login & Sign-up Pages Next episode: 14. Navigate to the Cart & Settings Pages

This video Navigate to the Home Page was last updated on Nov 8 2022

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

Episode 13 - Navigate to Home Page

We have to show the HomeScreens from two routes 1st when users SignUps for the first time we take the user to the HomeScreen and 2nd route when the user Logins that time we show the homeScreen. So First let us create these two function in the LoginIn Screen and SignUp Screen.

Provider.of<AppStateManager>(context, listen: false).login('Anyusername', 'anypassword'); 
if(appStateManager.isLoggedIn) HomeScreen.page(),
Provider.of<AppStateManager>(context, listen: false).onSignUpCompleted();
if (appStateManager.isLoggedIn || !appStateManager.isSignUp && appStateManager.onSignUpComplete) HomeScreen.page(),