Deepjyot Singh Kapoor
Deepjyot Singh Kapoor

Reputation: 103

What is the purpose of using routes in flutter?

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

Answers (1)

shafik alsalem
shafik alsalem

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

Related Questions