AFRouteState class

The current route, a list of nested screens and the data associated with them.

Annotations

Constructors

AFRouteState({required AFRouteStateSegments screenHierarchy, required Map<AFID, AFRouteSegment> globalPool, required AFTimeState timeLastUpdate, required Map<AFUIType, AFRouteStateShowScreen> showingScreens})
const
AFRouteState.initialState()
Creates the default initial state.
factory

Properties

activeScreen AFRouteSegment
no setter
activeScreenId AFScreenID
no setter
activeShowingScreens Iterable<AFRouteStateShowScreen>
no setter
globalPool Map<AFID, AFRouteSegment>
final
hashCode int
The hash code for this object.
no setterinherited
hasStartupWrapper bool
no setter
popCountToRoot int
Returns the number of pops to do to replace the entire path, but does not replace any afib test screens.
no setter
rootScreen AFRouteSegment
no setter
rootScreenId AFScreenID
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenHierarchy AFRouteStateSegments
final
segmentCount int
The number of screens in the route.
no setter
showingScreens Map<AFUIType, AFRouteStateShowScreen>
final
simpleTextRoute String
no setter
timeLastUpdate AFTimeState
final

Methods

addChildParam(AFRouteParam param) AFRouteState
Replaces the data on the current leaf element without changing the segments in the route.
cleanTestRoute() AFRouteState
Used internally to convert a test route, which has the prototype screens at its base, into a route that looks like what the app would have without the test stuff.
copyWith({AFRouteStateSegments? screenSegs, AFRouteStateSegments? popupSegs, Map<AFID, AFRouteSegment>? globalPool, AFTimeState? timeLastUpdate, Map<AFUIType, AFRouteStateShowScreen>? showScreen}) AFRouteState
exitTest() AFRouteState
Pops the route until we get to the first afib test screen.
findGlobalParam(AFID screen) AFRouteSegment?
Finds a drawer param for the drawer with the specified screen id.
findRouteParamFull({required AFScreenID screenId, required AFWidgetID wid, required AFRouteLocation routeLocation, bool includePrior = true}) AFRouteSegment?
findRouteParamInGlobalPool({required AFScreenID screenId, required AFWidgetID wid}) AFRouteSegment?
findRouteParamInHierarchy({required AFScreenID screenId, required AFWidgetID wid, bool includePrior = true}) AFRouteSegment?
findUnusedParam() AFRouteSegment
isActiveScreen(AFScreenID screen) bool
isNotShowing(AFUIType uiType) bool
isShowing(AFUIType uiType) bool
isShowingSpecific(AFUIType uiType, AFScreenID screenId) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop(dynamic childReturn) AFRouteState
Remove the leaf element from the route, returning back to the parent screen.
popAndPushNamed(AFRouteParam? param, List<AFRouteParam>? children, AFCreateDefaultChildParamDelegate? createDefaultChildParam) AFRouteState
Removes the current leaf from the route, and adds the specified screen and data in its place.
popCountToScreen(AFScreenID screen) int
Returns the number of pops to get to the specified screen in the root, or -1 if that screen isn't in the route.
popFromFlutter() AFRouteState
popN(int popCount, dynamic childReturn) AFRouteState
Remove the leaf element from the route, returning back to the parent screen.
popTo(AFScreenID screen, AFRouteParam? pushParam, List<AFRouteParam>? pushChildren, AFCreateDefaultChildParamDelegate? createDefaultChildParam, dynamic childReturn) AFRouteState
Remove the leaf element from the route, returning back to the parent screen.
pushNamed(AFRouteParam param, List<AFRouteParam>? children, AFCreateDefaultChildParamDelegate? createDefaultChildParam) AFRouteState
Adds a new screen/data below the current screen in the route.
removeChildParam({required AFScreenID screenId, required AFID wid, required AFRouteLocation routeLocation}) AFRouteState
Removes the route parameter for the specified child widget from the screen.
replaceAll(AFRouteParam param, List<AFRouteParam>? children, AFCreateDefaultChildParamDelegate? createDefaultChildParam) AFRouteState
Removes all existing segments in the route, and adds back the specified screen/data.
resetToInitialRoute() AFRouteState
routeEntryExists(AFScreenID screen, {bool includePrior = true}) bool
setChildParam(AFRouteParam param) AFRouteState
setGlobalPoolParam(AFID screen, AFRouteSegment revisedSeg) AFRouteState
Replaces the data on the current leaf element without changing the segments in the route.
showScreenBegin(AFScreenID screenId, AFUIType kind) AFRouteState
showScreenEnd(AFScreenID screenId) AFRouteState
toString() String
A string representation of this object.
override
updateRouteParam(AFRouteParam param, List<AFRouteParam>? children, AFCreateDefaultChildParamDelegate? createDefaultChildParam) AFRouteState
Replaces the data on the current leaf element without changing the segments in the route.
updateRouteParamWithExistingOrDefault(AFRouteParamRef param) AFRouteState
updateTimeRouteParameters(AFTimeState now) AFRouteState

Operators

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