Material Page Route and Named Route in Flutter.

Osama Asif
Jul 2, 2020

--

So let’s start with the basic code of splash screen where I am only using Image and circular progress indicator.

In above Code we have on splash screen class that i called in my main MaterialApp -> home: SplashScreen();

Complete Code of sample is here.

Let’s move forward to the material page route I am using Future.delayed function for move forward to the next screen in a given time period.

Navigator.push(context, MaterialPageRoute(builder: (context)=> Login())); is used to navigate to the login screen.

Hurray…!! We have done the materialPageRouting, Now the next part is Named Routing.

For this we have to declare routes in our main app.

you can name this route with any name.

After this use the same navigator but this time use named route.

Great you have to only give the route name in second argument.

So, we have done the second part Most of the large scale apps use Named Route for navigation.

Hope you like it…. keep supporting me the video tutorial link is given below subscribe to my channel for more Thank You.

--

--

Osama Asif
Osama Asif

Written by Osama Asif

Seasoned software engineer with over 6 years of extensive industry experience specializing in the development of mobile applications.

No responses yet