Navigator class

A navigation outlet.

Notice: Only a single instance of Navigator should be present in an app.

Inheritance

Constructors

Creates a new instance of Navigator.
const

Properties

child Widget
final
fallback Widget
The widget that should be displayed when a lazy route is being loaded.
final
hashCode int
The hash code for this object.
no setterinherited
key String?
finalinherited
popAnimation Animation?
The animation that should be applied to the child after the previous one was popped.
final
pushAnimation Animation?
The animation that should be applied to the child after it's been pushed.
final
ref Ref?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createNode() StatefulNode<StatefulWidget>
Returns a Node corresponding to this Widget at a particular location in the Node tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget.
override
matches(Widget otherWidget) bool
Checks if two widgets match during a ReassemblableNode reassembly.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

pop() → void
Pops the latest modal. If all modals are popped, the current route is popped.
pushModal({required void onPop()}) → void
Pushes a new modal to the navigation state.
pushRoute({required StatelessWidgetBuilder builder}) → void
Pushes a new route synchronously.
pushRouteLazily({required Future loader(), required StatelessWidgetBuilder builder}) → void
Pushes a new route lazily. Navigator.fallback is rendered while the route is being loaded.