Class NavigatorState
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.State<Navigator>
com.ultikits.ultitools.abstracts.gui.declarative.widgets.navigation.NavigatorState
The state class for Navigator.
Manages the route history.
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- UltiTools Team
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(BuildContext context) Builds this State's UI.booleancanPop()Checks whether a route can be popped.voidInitializes the state.voidpop()Pops the current route.voidPushes a new route.voidpushReplacement(@NotNull String routeName) Replaces the current route.
-
Field Details
-
history
-
-
Constructor Details
-
NavigatorState
public NavigatorState()
-
-
Method Details
-
initState
public void initState()Description copied from class:StateInitializes the state.Called once, after the State object is created and before it is inserted into the tree. Subscribe to streams, start animations, or run other one-time initialization here.
Must call super.initState().
-
push
Pushes a new route.- Parameters:
routeName- the route name
-
pop
public void pop()Pops the current route. Does nothing if only one route remains. -
pushReplacement
Replaces the current route.- Parameters:
routeName- the new route name
-
canPop
public boolean canPop()Checks whether a route can be popped.- Returns:
- true if the history has more than one entry
-
build
Description copied from class:StateBuilds this State's UI.This method is called:
- after initState
- after didUpdateWidget
- after setState
- when a depended-upon InheritedWidget changes
-