Reputation: 103
initialRoute: '/',
routes: {
'/':(context)=> WelcomeScreen() ,
'/login':(context) => LoginScreen() ,
'/register':(context)=>RegistrationScreen(),
}
I am not getting the purpose of using routes, is it just to keep of record in MaterialApp class that where we actually navigate?
Upvotes: 1
Views: 44
Reputation: 26
It is something more easy to use , when you want to navigate to a new screen, or to a new URL Because flutter us using for web also Please visit this link for more information
https://flutter.dev/docs/cookbook/navigation/named-routes
Upvotes: 1