AppRouteState class
Represents the complete route state of the app.
This class stores the current route as well as the routes of all navigation items in the main app screen.
If current is null, then that means the main app screen should
be in focus.
- Annotations
Constructors
-
AppRouteState({Map<
AppRootRoute, AppRoute> appRoutes = const {}, AppRootRoute appRootRoute = AppRootRoute.fleet, AppRoute? current, FleetView fleetView = FleetView.map, bool fleetShowingDashboard = false})
Properties
- appRootRoute → AppRootRoute
-
The current app root route.
final
-
appRoutes
→ Map<
AppRootRoute, AppRoute> -
Map of app screen-related root routes to the actual app route for
that page.
final
- current → AppRoute?
-
The currently focused route, or
nullif the current route is a root route on the main app screen.final - fleetShowingDashboard → bool
-
Whether the fleet route is showing the dashboard
final
- fleetView → FleetView
-
The view that the fleet route is displaying
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCurrentRoute(
) → AppRoute - Returns the closest representation of the currentl top-most route.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toPopped(
) → AppRouteState? - Returns a copy of the app route state but with the current route popped.
-
toString(
) → String -
A string representation of this object.
inherited
-
withCurrentRoute(
AppRoute currentRoute) → AppRouteState - Returns a copy of the app route state but with the given current route
-
withPoppedRoute(
AppRoute route) → AppRouteState - Returns a copy of the app route state but with the given route removed if it is in the route stack
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isRootRoute(
AppRoute appRoute) → bool - Whether the given route is an app-screen related root route