BrowserRoute class

Defines a single route in the application's navigation map.

Each BrowserRoute associates a path (like '/home' or '/profile/:id') with a page widget that should be displayed. It also allows for defining a default routeTransition and argument validation logic.

Implementers

Constructors

BrowserRoute({required String path, required Widget page, dynamic builderTrigger(BuildContext context)?, bool validateArguments(Check checkArgument, GetArguments getArgument)?, RouteTransition routeTransition = RouteTransition.slide_right})
const

Properties

builderTrigger → dynamic Function(BuildContext context)?
An optional function that is executed just before the page widget is built.
final
hashCode int
The hash code for this object.
no setterinherited
page Widget
The widget to be displayed when this route is active.
final
path String
The unique path for this route (e.g., '/profile').
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
routeTransition RouteTransition
The default transition animation for this route. This can be overridden by a TraceRoute during navigation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
validateArguments bool Function(Check checkArgument, GetArguments getArgument)?
An optional function to validate arguments before navigating to this route.
final

Methods

copyWith({String? path, Widget? page, RouteTransition? routeTransition, dynamic builderTrigger(BuildContext context)?, bool validateArguments(Check checkArgument, GetArguments getArgument)?}) BrowserRoute
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