TemporaryQRouter class

A widget that creates a temporary navigator with the given routes. This will create temporary router to use it in a specific part of the app. The router will be created with the given routes and will be disposed when the widget is disposed.

LImitation: URL Navigation: The temporary router will not function if the user directly types the path into the URL. This limitation arises because the temporary router is designed to exist only within the widget tree and is destroyed when the widget is removed.

Inheritance

Constructors

TemporaryQRouter.new({required String path, required List<QRoute> routes, String? name, String? initPath, List<NavigatorObserver>? observers, String? restorationId, Key? key})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
initPath String?
The initial path to be shown when the router is initialized.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
name String?
The name of the temporary route.
final
observers List<NavigatorObserver>?
A list of observers to be attached to the navigator.
final
path String
The path for the temporary route.
final
restorationId String?
A restorationId to be attached to the navigator.
final
routes List<QRoute>
An array of routes to be managed by this temporary router.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<TemporaryQRouter>
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