pushNamed<T> method

Future<T?> pushNamed<T>(
  1. String routeName, {
  2. Object? arguments,
})

Pushes a named route onto the navigator.

Implementation

Future<T?> pushNamed<T>(String routeName, {Object? arguments}) async {
  final result = await _key.currentState?.pushNamed<T>(
    routeName,
    arguments: arguments,
  );

  return result;
}