How to create route in Flutter App

0 votes

Hi Guys,

I have created a Flutter App. I want to create a route so that I can navigate to other screens. How can I do that?

Sep 8, 2020 in Others by akhtar
• 38,210 points
87 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to initialize your route in the main function of your Flutter App. When your App builds it will load the route. You can see the below example.

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  Firebase.initializeApp();
  runApp(MaterialApp(
    initialRoute: "home",
    routes: {
      "home": (context) => HomePage(),
}
)
)
}
answered Sep 8, 2020 by MD
• 95,320 points

Related Questions In Others

0 votes
1 answer

How to create a Project in Flutter?

Hi@akhtar, Flutter has an inbuilt command to create ...READ MORE

answered Jul 20, 2020 in Others by MD
• 95,320 points
228 views
0 votes
1 answer

How to create an Icon Button in Flutter?

Hi@akhtar, To create an Icon Button in Flutter, ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,320 points
265 views
0 votes
1 answer

How to add one image in Flutter App?

Hi@akhtar, You can use Image.network() method to add ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,320 points
145 views
0 votes
1 answer

How to create Toast in Flutter?

Hi@akhtar, You can use the toast plugin to ...READ MORE

answered Jul 27, 2020 in Others by MD
• 95,320 points
446 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,210 points
252 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,320 points
367 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,320 points
592 views
0 votes
1 answer

How to create a Volume Icon in Flutter App?

Hi@akhtar, You can use Icon Widget to create ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,320 points
591 views
0 votes
1 answer

How to create a navigation bar in Flutter app?

Hi@akhtar, To add a drawer to the app, ...READ MORE

answered Aug 25, 2020 in Others by MD
• 95,320 points
316 views