Navigate with named routes

Set up app links for Android

Pass arguments to a named route

Cookbook

Navigation

Pass arguments to a named route

1. Define the arguments you need to pass

2. Create a widget that extracts the arguments

3. Register the widget in the routes table

4. Navigate to the widget

Alternatively, extract the arguments using onGenerateRoute

Interactive example

The Navigator provides the ability to navigate
to a named route from any part of an app using
a common identifier.
In some cases, you might also need to pass arguments to a
named route. For example, you might wish to navigate to the /user route and
pass information about the user to that route.

Note:
  Named routes are no longer recommended for most
  applications. For more information, see
  Limitations in the navigation overview page.