RouteController class

Constructors

RouteController({RouteState<Object?> initialRouteState()?, RouteState<Object?> errorRouteState()?, required RouteState<Object?> fallbackRouteState(), required List<RouteBuilder<Object?>> builders})

Properties

canGoBackward bool
no setter
canGoForward bool
no setter
current RouteState<Object?>?
no setter
currentRouteState RouteState<Object?>
no setter
errorRouteState RouteState<Object?> Function()?
final
fallbackRouteState RouteState<Object?> Function()
final
hashCode int
The hash code for this object.
no setterinherited
pCurrentRouteState ChildPod<_NavigationState, RouteState<Object?>>
latefinal
pNavigationState GenericPod<_NavigationState>
no setter
requested RouteState<Object?>?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addToCache(Iterable<RouteState<Object?>> routeStates) → void
buildScreen(BuildContext context, RouteState<Object?> routeState) Widget
checkBackwardRoute(RouteState<Object?> routeState) bool
Whether the previous/backward route is routeState.
checkForwardRoute(RouteState<Object?> routeState) bool
Whether the next/forward route is routeState.
checkRouteFromIndex(int index, bool checker(RouteState<Object?> routeState)) bool
Safely retrieves a RouteState at a specific index in the history and evaluates it with the provided checker.
checkRouteFromStep(int step, bool checker(RouteState<Object?> routeState)) bool
Checks a RouteState at a relative position from the current one without performing navigation. The step determines the direction and distance (e.g., -1 for the previous route,1 for the next).
clearCache() → void
clearHistory() → void
dispose() → void
getNavigatorOrFallbackRouteState() RouteState<Object?>
go(int index, {AnimationEffect forwardAnimationEffect = const NoEffect(), AnimationEffect backwardAnimationEffect = const NoEffect()}) bool
goBack({AnimationEffect animationEffect = const NoEffect()}) bool
goBackward({AnimationEffect animationEffect = const NoEffect()}) bool
goForward({AnimationEffect animationEffect = const NoEffect()}) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathExists(Uri path) bool
push<TExtra extends Object?>(RouteState<TExtra> routeState, {RouteState<Object?>? errorFallback, AnimationEffect? animationEffect}) → void
pushUri(Uri uri, {RouteState<Object?>? errorFallback, AnimationEffect forwardAnimationEffect = const NoEffect(), AnimationEffect backwardAnimationEffect = const NoEffect()}) → void
removeFromCache(Iterable<RouteState<Object?>> routeStates) → void
resetState() → void
setPreservationStrategy(_TPreservationStrategy shouldPreserve) → void
step(int steps, {AnimationEffect forwardAnimationEffect = const NoEffect(), AnimationEffect backwardAnimationEffect = const NoEffect()}) bool
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

defaultPreservationStrategy ↔ _TPreservationStrategy
getter/setter pair

Static Methods

of(BuildContext context) RouteController