backAndtoNamed method

  1. @override
Future<T?> backAndtoNamed(
  1. String page, {
  2. Object? result,
  3. Object? arguments,
})
override

Navigates back to a named page with an optional result and arguments.

Implementation

@override
Future<T?> backAndtoNamed(
  String page, {
  Object? result,
  Object? arguments,
}) async {
  final PageSettings args = _buildPageSettings(page, arguments);
  final RouteDecoder<T>? route = _getRouteDecoder(args);
  if (route == null) {
    return null;
  }
  _popWithResult(result as T?);
  return _push(route);
}