RoutingController class abstract

An Abstraction for an object that manages page navigation

Mixed in types
Implementers

Constructors

RoutingController()

Properties

canNavigateBack bool
See NavigationHistory.canNavigateBack
no setter
childControllers List<RoutingController>
Holds track of the list of attached child controllers
no setter
current RouteData
Returns currentChild if it's rendered otherwise returns parent routeData
no setter
currentChild RouteData?
The active child representation of an implementation of this controller
no setter
currentPath String
Helper to access NavigationHistory.urlState.path
no setter
currentSegments List<RouteMatch>
Collects the top-most visitable current-child of every top-most nested controller considering this controller as root
no setter
currentUrl String
Helper to access NavigationHistory.urlState.url
no setter
hasEntries bool
Whether this controller has rendered pages
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
ignorePopCompleters bool
Whether AutoRoutePage should await for pop-completer
getter/setter pair
isRoot bool
Whether is controller is the root of all controllers
no setter
isTopMost bool
Whether this controller has the top-most visible page
no setter
key LocalKey
The Identifier key of this routing controller
no setter
managedByWidget bool
Whether is router is used by a declarative-routing widget
no setter
matcher → RouteMatcher
The matcher used by this controller see RouteMatcher
no setter
The instance of NavigationHistory to be used by this router
no setter
pageBuilder PageBuilder
The builder used to build routable pages
no setter
pageCount int
The count of rendered pages
no setter
parentAsStackRouter StackRouter?
Returns parent route as StackRouter
no setter
pathState Object?
See NavigationHistory.pathState
no setter
root RootStackRouter
Returns the root router as RootStackRouter
no setter
routeCollection RouteCollection
The list of routes consumed by this controller
no setter
routeData RouteData
The data of the parent route
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stack List<AutoRoutePage>
The current pages stack of this controller
no setter
stackData List<RouteData>
Returns an unmodifiable lis of current pages stack data
no setter
stateHash int
Takes a state snapshot of the current segments
no setter
topMatch RouteMatch
The top-most rendered or pending route match
no setter
topPage AutoRoutePage?
The top-most visible page
no setter
topRoute RouteData
The top-most rendered route
no setter
urlState UrlState
Helper to access NavigationHistory.urlState
no setter

Methods

activeRouterCanPop({bool ignorePagelessRoutes = false}) bool
returns true if the active child controller can pop
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
attachChildController(RoutingController childController) → void
Adds the given controller to the list of childControllers
back() → void
See NavigationHistory.back
buildPageRoute(String? path, {bool includePrefixMatches = true}) PageRouteInfo?
Finds match of path then returns a route-able entity
buildPageRoutesStack(String? path, {bool includePrefixMatches = true}) List<PageRouteInfo>?
Finds matches of path then returns a list of route-able entities
canPop({bool ignoreChildRoutes = false, bool ignoreParentRoutes = false, bool ignorePagelessRoutes = false}) bool
Whether this controller can preform maybePop
childrenCanPop({bool ignorePagelessRoutes = false}) bool
returns true if any child controller can pop
currentHierarchy({bool asPath = false, bool ignorePending = false, bool ignoreParams = false}) List<HierarchySegment>
Builds a simplified hierarchy of current stacks
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
innerRouterOf<T extends RoutingController>(String routeName) → T?
Finds a child route corresponding to routeName and casts it to T
isPathActive(String path) bool
See NavigationHistory.isPathActive
isRouteActive(String routeName) bool
See NavigationHistory.isRouteActive
isRouteDataActive(RouteData data) bool
See NavigationHistory.isRouteDataActive
markUrlStateForReplace() → void
See NavigationHistory.markUrlStateForReplace
match(PageRouteInfo route) RouteMatch?
Helper to find route match See RouteMatcher.matchByRoute
maybePop<T extends Object?>([T? result]) Future<bool>
Clients can either pop their own _pages stack or defer the call to a parent controller
maybePopTop<T extends Object?>([T? result]) Future<bool>
Calls maybePop on the controller with the top-most visible page
Pops until given route, if it already exists in stack otherwise adds it to the stack (good for web Apps and to avoid duplicate entries).
Pops until given path, if it already exists in stack otherwise adds it to the stack
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyAll({bool forceUrlRebuild = false}) → void
Notify this controller for changes then notify root controller if they're not the same
notifyListeners() → void
Call all the registered listeners.
inherited
parent<T extends RoutingController>() → T?
Casts parent controller to T
pop<T extends Object?>([T? result]) Future<bool>
Clients can either pop their own _pages stack or defer the call to a parent controller
popTop<T extends Object?>([T? result]) Future<bool>
Calls maybePop on the controller with the top-most visible page
pushPathState(Object? state) → void
See NavigationHistory.pushPathState
removeChildController(RoutingController childController) → void
removes the given controller from the list of childControllers
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
topMostRouter({bool ignorePagelessRoutes = false}) RoutingController
Finds the router with top-most visible page
toString() String
A string representation of this object.
override
updateRouteData(RouteData data) → void
Updates the value of routeData

Operators

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