Sitemap
KNNX Corp.

KNNX is a global leader in the development and deployment of innovative enterprise solutions using distributed ledger technology.

Flutter App: Navigation & Routing

3 min readJul 27, 2022

--

Press enter or click to view image in full size
Flutter App Navigation & Routing

Routing from one screen to the other is simple in a mobile application. Every mobile development framework has a unique way of addressing this.

Flutter app

In a Flutter app, this is achieved in three ways:

  1. Dynamic Routing
  2. Static Routing
  3. Generated Route technique

Let me explain each of the above with the help of an example.

Dynamic Routing

In dynamic routing, Navigator’s push method is used to get a user from one screen to another. A developer must provide the content and route parameters when using this method. The syntax needed to push a user to the new screen using dynamic routing in Flutter is below:

Navigator.push(context,MaterialPageRoute(builder: (context) => PageToLoad()),);

Static Routing

When using static routing in a Flutter app, a developer configures the routes in the MaterialApp widget. He/she must provide the initial route in the Flutter app:

MaterialApp(

--

--

KNNX Corp.
KNNX Corp.

Published in KNNX Corp.

KNNX is a global leader in the development and deployment of innovative enterprise solutions using distributed ledger technology.

KNNX Corp.
KNNX Corp.

Written by KNNX Corp.

KNNX is a global leader in Distributed Ledger Technology and Enterprise Products. To learn more, head over to: https://www.knnx.com/

No responses yet