Navigator<T> class

Builds child based on public route state. Use Navigator.setRoute

Inheritance

Constructors

Builds child based on public route state. Use Navigator.setRoute
const

Properties

builder Renderable Function(ProviderContainer container, T route)
Builder for child based on state. Null for starting state.
final
hashCode int
The hash code for this object.
no setterinherited
key NavKey<T>
Key used to differentiate states.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getChild(ProviderContainer container) Renderable
Get current child.
getSize(ProviderContainer container, Axis axis, int crossSize) int?
Report this item's intrinsic size, or null if it has none.
override
getState(ProviderContainer container) → T?
Get local state of this object.
getUsageInfo(ProviderContainer container) UsageInfo
Return usage info for this renderable, or redirect to its child.
override
keyPressed(ProviderContainer container, KeyInput key) bool
Handle key presses. Return true if the key was absorbed, or false if another listener further up the tree should handle it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(ProviderContainer container, int width, int height) AxelMap
Produce an AxelMap of the specified size to be shown on screen.
override
setState(ProviderContainer container, T? update(T?)) → void
Set local state of this object.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

currentRoute<T>(ProviderContainer container, NavKey<T> key) → T
Gets the current route for the type provided. Null if starting route.
Set navigator route. Return true if page changed, otherwise false.
Reset navigator to starting state. Returns true if page changed, otherwise false.
Navigate to the parent of the current route. Returns true if page changed, otherwise false.
stateProvider<T>(NavKey<T> key) → dynamic
Provider for local state