pushFlutterRouteForResult method

  1. @override
Future<Object?> pushFlutterRouteForResult(
  1. PageSettings page
)
override

Like pushFlutterRoute, but completes with the result the pushed screen pops with (null when dismissed without one).

The value is in wire encoding; generated routes with a result type expose a typed pushForResult() that decodes it.

Implementation

@override
Future<Object?> pushFlutterRouteForResult(PageSettings page) async {
  pushedPages.add(page);
  return resultsByRouteId[page.routeId];
}