PathStack class
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 setter inherited
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
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 setter inherited
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