Reset class
A widget that declaratively performs a "reset" navigation action when it is inserted into the widget tree.
Upon initialization (after the first frame is built), this widget will instruct the Wouter router to clear the entire current navigation stack and then build a new stack based on the list of paths provided in to.
This is useful for scenarios where you need to completely redefine the navigation history, such as:
- After a user logs out, redirecting to a login screen with no prior history.
- Navigating to a deep-linked state that requires a specific back stack.
- Programmatically setting up an initial stack for the application.
The widget itself typically renders its child (which defaults to an empty SizedBox.shrink), as its primary purpose is the navigation side effect.
- Inheritance
Constructors
Properties
- child → Widget
-
The widget to display. Defaults to SizedBox.shrink if primarily used
for its navigation side effect.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
to
→ List<
String> -
A list of paths that will form the new navigation stack.
The Wouter router will clear its current stack and then push each of these
paths in order. Paths will be resolved by Wouter (e.g., relative paths
are resolved against the current context before the reset operation).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Reset> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited