pushNamed<T extends Object?> method

Future<T?> pushNamed<T extends Object?>(
  1. String routeName, {
  2. Object? arguments,
  3. bool rootNavigator = false,
})

Pushes a named route onto the navigator.

Allows passing arguments to the route. rootNavigator determines whether to push the route onto the root navigator or the nearest Navigator ancestor.

Returns a Future that completes with the result of the pushed route when it is popped.

Implementation

Future<T?> pushNamed<T extends Object?>(
  String routeName, {
  Object? arguments,
  bool rootNavigator = false,
}) {
  return Navigator.of(
    this,
    rootNavigator: rootNavigator,
  ).pushNamed(routeName, arguments: arguments);
}