java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.State<Navigator>
com.ultikits.ultitools.abstracts.gui.declarative.widgets.navigation.NavigatorState

public class NavigatorState extends State<Navigator>
The state class for Navigator.

Manages the route history.

Since:
6.2.0
Version:
1.0.0
Author:
UltiTools Team
  • Field Details

  • Constructor Details

    • NavigatorState

      public NavigatorState()
  • Method Details

    • initState

      public void initState()
      Description copied from class: State
      Initializes 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().

      Overrides:
      initState in class State<Navigator>
    • push

      public void push(@NotNull @NotNull String routeName)
      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

      public void pushReplacement(@NotNull @NotNull String routeName)
      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

      public Widget build(BuildContext context)
      Description copied from class: State
      Builds this State's UI.

      This method is called:

      • after initState
      • after didUpdateWidget
      • after setState
      • when a depended-upon InheritedWidget changes
      Specified by:
      build in class State<Navigator>
      Parameters:
      context - the build context
      Returns:
      the Widget tree