FakeInlayNavigator class
Recording InlayNavigator double for widget and unit tests.
No platform channel is involved: every navigation call is recorded so tests can assert on it. Install it by overriding the singleton:
final navigator = FakeInlayNavigator();
InlayNavigator.instance = navigator;
// ... pump a widget, tap a button ...
expect(navigator.pushedRoutes.single, isA<CounterPage>());
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- nativePopGestureEnabled ↔ bool?
-
Last value passed to setNativePopGestureEnabled, if any.
getter/setter pair
- popCount ↔ int
-
Number of container pops (pop calls, plus maybePop calls that
could not pop an in-Flutter route).
getter/setter pair
-
poppedResults
→ List<
Object?> -
Wire-encoded results passed to pop, in call order (
nullentries included).final -
pushedPages
→ List<
PageSettings> -
Raw PageSettings passed to the lower-level dispatch methods
(pushFlutterRoute, pushNativeRoute, presentFlutterDialog),
including those produced by push.
final
-
pushedRoutes
→ List<
InlayRoute> -
Typed routes passed to push, in call order.
final
-
resultsByRouteId
→ Map<
String, Object?> -
Scripted results returned by the
*ForResultmethods, keyed byrouteId. Missing entries resolve tonull(dismissed without a result).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
maybePop(
BuildContext context) → Future< void> -
Pops the topmost Flutter route if the navigator can pop, otherwise
closes the native container (Activity/ViewController).
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pop(
[Object? result]) → Future< void> -
Pop (finish) the current Flutter Activity/ViewController.
override
-
presentFlutterDialog(
PageSettings page) → Future< void> -
Present a Flutter dialog in a transparent native container.
override
-
presentFlutterDialogForResult(
PageSettings page) → Future< Object?> -
Like presentFlutterDialog, but completes with the result the dialog
pops with (
nullwhen dismissed without one).override -
push(
InlayRoute route) → Future< void> -
Pushes a route, creating a new native Activity/ViewController.
override
-
pushFlutterRoute(
PageSettings page) → Future< void> -
Starts a new Activity/ViewController with a new Flutter engine.
override
-
pushFlutterRouteForResult(
PageSettings page) → Future< Object?> -
Like pushFlutterRoute, but completes with the result the pushed
screen pops with (
nullwhen dismissed without one).override -
pushNativeRoute(
PageSettings page) → Future< void> -
Internal method: open a native Activity/ViewController route.
override
-
pushNativeRouteForResult(
PageSettings page) → Future< Object?> -
Like pushNativeRoute, but completes with the result the native
screen passes to its handler completion (
nullwhen it finishes without one).override -
setNativePopGestureEnabled(
bool enabled) → Future< void> -
Enable/disable native iOS swipe-back gesture for this container.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited