MockNavigator class
A mock navigator which can be used to stub navigation for testing purposes.
- Inheritance
- Implemented types
Constructors
- A mock navigator which can be used to stub navigation for testing purposes.
Properties
- bucket → RestorationBucket?
-
The RestorationBucket used for the restoration data of the
RestorablePropertys registered to this mixin.
no setterinherited
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- focusNode → FocusNode
-
The FocusNode for the Focus that encloses the routes.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
- overlay → OverlayState?
-
The overlay this navigator uses for its visual presentation.
no setterinherited
- restorationId → String?
-
The restoration ID used for the RestorationBucket in which the mixin
will store the restoration data of all registered properties.
no setterinherited
- restorePending → bool
-
Whether restoreState will be called at the beginning of the next build
phase.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userGestureInProgress → bool
-
Whether a route is currently being manipulated by the user, e.g.
as during an iOS back gesture.
no setterinherited
-
userGestureInProgressNotifier
→ ValueNotifier<
bool> -
Notifies its listeners if the value of userGestureInProgress changes.
finalinherited
- widget → Navigator
-
The current configuration.
no setterinherited
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
canPop(
) → bool -
Whether the navigator can be popped.
inherited
-
createTicker(
TickerCallback onTick) → Ticker -
Creates a ticker with the given callback.
inherited
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didStartUserGesture(
) → void -
The navigator is being controlled by a user gesture.
inherited
-
didStopUserGesture(
) → void -
A user gesture completed.
inherited
-
didToggleBucket(
RestorationBucket? oldBucket) → void -
Called when bucket switches between null and non-null values.
inherited
-
didUpdateRestorationId(
) → void -
Must be called when the value returned by restorationId changes.
inherited
-
didUpdateWidget(
covariant Navigator oldWidget) → void -
Called whenever the widget configuration changes.
inherited
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
inherited
-
finalizeRoute(
Route route) → void -
Complete the lifecycle for a route that has been popped off the navigator.
inherited
-
initState(
) → void -
Called when this object is inserted into the tree.
inherited
-
maybePop<
T extends Object?> ([T? result]) → Future< bool> -
Consults the current route's Route.popDisposition method, and acts
accordingly, potentially popping the route as a result; returns whether
the pop request should be considered handled.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pop<
T extends Object?> ([T? result]) → void -
Pop the top-most route off the navigator.
inherited
-
popAndPushNamed<
T extends Object?, TO extends Object?> (String routeName, {TO? result, Object? arguments}) → Future< T?> -
Pop the current route off the navigator and push a named route in its
place.
inherited
-
popUntil(
RoutePredicate predicate) → void -
Calls pop repeatedly until the predicate returns true.
inherited
-
push<
T extends Object?> (Route< T> route) → Future<T?> -
Push the given route onto the navigator.
inherited
-
pushAndRemoveUntil<
T extends Object?> (Route< T> newRoute, RoutePredicate predicate) → Future<T?> -
Push the given route onto the navigator, and then remove all the previous
routes until the
predicate
returns true.inherited -
pushNamed<
T extends Object?> (String routeName, {Object? arguments}) → Future< T?> -
Push a named route onto the navigator.
inherited
-
pushNamedAndRemoveUntil<
T extends Object?> (String newRouteName, RoutePredicate predicate, {Object? arguments}) → Future< T?> -
Push the route with the given name onto the navigator, and then remove all
the previous routes until the
predicate
returns true.inherited -
pushReplacement<
T extends Object?, TO extends Object?> (Route< T> newRoute, {TO? result}) → Future<T?> -
Replace the current route of the navigator by pushing the given route and
then disposing the previous route once the new route has finished
animating in.
inherited
-
pushReplacementNamed<
T extends Object?, TO extends Object?> (String routeName, {TO? result, Object? arguments}) → Future< T?> -
Replace the current route of the navigator by pushing the route named
routeName
and then disposing the previous route once the new route has finished animating in.inherited -
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
registerForRestoration(
RestorableProperty< Object?> property, String restorationId) → void -
Registers a RestorableProperty for state restoration.
inherited
-
removeRoute(
Route route) → void -
Immediately remove
route
from the navigator, and Route.dispose it.inherited -
removeRouteBelow(
Route anchorRoute) → void -
Immediately remove a route from the navigator, and Route.dispose it. The
route to be removed is the one below the given
anchorRoute
.inherited -
replace<
T extends Object?> ({required Route oldRoute, required Route< T> newRoute}) → void -
Replaces a route on the navigator with a new route.
inherited
-
replaceRouteBelow<
T extends Object?> ({required Route anchorRoute, required Route< T> newRoute}) → void -
Replaces a route on the navigator with a new route. The route to be
replaced is the one below the given
anchorRoute
.inherited -
restorablePopAndPushNamed<
T extends Object?, TO extends Object?> (String routeName, {TO? result, Object? arguments}) → String -
Pop the current route off the navigator and push a named route in its
place.
inherited
-
restorablePush<
T extends Object?> (RestorableRouteBuilder< T> routeBuilder, {Object? arguments}) → String -
Push a new route onto the navigator.
inherited
-
restorablePushAndRemoveUntil<
T extends Object?> (RestorableRouteBuilder< T> newRouteBuilder, RoutePredicate predicate, {Object? arguments}) → String -
Push a new route onto the navigator, and then remove all the previous
routes until the
predicate
returns true.inherited -
restorablePushNamed<
T extends Object?> (String routeName, {Object? arguments}) → String -
Push a named route onto the navigator.
inherited
-
restorablePushNamedAndRemoveUntil<
T extends Object?> (String newRouteName, RoutePredicate predicate, {Object? arguments}) → String -
Push the route with the given name onto the navigator, and then remove all
the previous routes until the
predicate
returns true.inherited -
restorablePushReplacement<
T extends Object?, TO extends Object?> (RestorableRouteBuilder< T> routeBuilder, {TO? result, Object? arguments}) → String -
Replace the current route of the navigator by pushing a new route and
then disposing the previous route once the new route has finished
animating in.
inherited
-
restorablePushReplacementNamed<
T extends Object?, TO extends Object?> (String routeName, {TO? result, Object? arguments}) → String -
Replace the current route of the navigator by pushing the route named
routeName
and then disposing the previous route once the new route has finished animating in.inherited -
restorableReplace<
T extends Object?> ({required Route oldRoute, required RestorableRouteBuilder< T> newRouteBuilder, Object? arguments}) → String -
Replaces a route on the navigator with a new route.
inherited
-
restorableReplaceRouteBelow<
T extends Object?> ({required Route anchorRoute, required RestorableRouteBuilder< T> newRouteBuilder, Object? arguments}) → String -
Replaces a route on the navigator with a new route. The route to be
replaced is the one below the given
anchorRoute
.inherited -
restoreState(
RestorationBucket? oldBucket, bool initialRestore) → void -
Called to initialize or restore the RestorablePropertys used by the
State object.
inherited
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
unregisterFromRestoration(
RestorableProperty< Object?> property) → void -
Unregisters a RestorableProperty from state restoration.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited