PathStack class

Inheritance

Constructors

PathStack({Key? key, String? path, required Map<List<String>, PathStackRouteBuilder> routes, String? basePath, bool caseSensitive = false, Widget scaffoldBuilder(BuildContext context, Widget child)?, Widget transitionBuilder(BuildContext context, Widget child, AnimationController animation)?, Duration? transitionDuration, PathStackRouteBuilder? unknownRouteBuilder, void onRouteChanging(String path, Map<String, String> args, {String matchedRoute})?, bool verboseMode = false})

Properties

basePath String?
Sets the base path for all child routes, similar to base href in html.toStackRoute By default, this inherits from parent Stacks, in a recursive manner so you normally don't have to set it.
final
caseSensitive bool
Whether this stack is caseSensitive when looking for path matches
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onRouteChanging → (void Function(String path, Map<String, String> args, {String matchedRoute})?)
A callback whenever route changes. A PathStackRouteChangingNotification is also dispatched.
final
path String?
Determines which route gets shown. This is analogous to IndexedStack.index It is nullable because PathStack will inherit .path from any parents, and also any PathStackPathProvider widgets above it. If no path can be located, and no path is assigned, it will default to PathStack.defaultPath
final
routes Map<List<String>, PathStackRouteBuilder>
A map of all routes that this path stack can handle
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldBuilder → (Widget Function(BuildContext context, Widget child)?)
Wraps all child routes in a shared widget
final
transitionBuilder → (Widget Function(BuildContext context, Widget child, AnimationController animation)?)
Provides a custom animation when a new route is shown. Supports only transitionIn right now.
final
transitionDuration Duration?
The duration of the transitionIn animation
final
unknownRouteBuilder PathStackRouteBuilder?
Returns a widget to show when no path match can be found
final
verboseMode bool
Whether to output more verbose debug logs
final

Methods

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

Static Properties

defaultDuration Duration
getter/setter pair
defaultPath String
getter/setter pair

Static Methods

of(BuildContext context) PathStackState?