pushNativeRouteForResult method

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

Like pushNativeRoute, but completes with the result the native screen passes to its handler completion (null when it finishes without one).

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

Implementation

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