FastNav class

Contextless navigator

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

canPop({String? navigator}) bool
Whether the navigator can be popped
init([GlobalKey<NavigatorState>? key]) GlobalKey<NavigatorState>
Register the root navigator with FastNav
pop<T extends Object?>({String? navigator, T? result}) → void
Pop the current page
push<T extends Object?>(Widget page, {String? navigator, RouteType? routeType, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, bool? allowSnapshotting}) Future<T?>
Navigate to an anonymous page route
pushAndRemoveAll<T extends Object?>(Widget page, {String? navigator, RouteType? routeType, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, bool? allowSnapshotting}) Future<T?>
Remove all pages and push a new anonymous page route
pushAndRemoveUntil<T extends Object?>(Widget page, bool predicate(Route route), {String? navigator, RouteType? routeType, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, bool? allowSnapshotting}) Future<T?>
Remove pages until predicate returns true and push a new anonymous page route
pushNamed<T extends Object?>(String routeName, {String navigator = _rootNavigatorName, Object? arguments}) Future<T?>
Navigate to a named page route
pushNamedAndRemoveAll<T extends Object?>(String newRouteName, {String navigator = _rootNavigatorName, Object? arguments}) Future<T?>
Remove all pages and push a named page route
pushNamedAndRemoveUntil<T extends Object?>(String newRouteName, bool predicate(Route route), {String navigator = _rootNavigatorName, Object? arguments}) Future<T?>
Remove pages until predicate returns true and push a named page route
pushReplacement<T extends Object?, TO extends Object?>(Widget page, {String? navigator, RouteType? routeType, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, bool? allowSnapshotting, TO? result}) Future<T?>
Replace the current page with a new anonymous page route
pushReplacementNamed<T extends Object?, TO extends Object?>(String routeName, {String navigator = _rootNavigatorName, TO? result, Object? arguments}) Future<T?>
Replace the current page with a named page route
registerNavigator(String name, {GlobalKey<NavigatorState>? key}) GlobalKey<NavigatorState>
Register a nested navigator with FastNav
reset() → void
Reset FastNav for testing