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, void builderTrigger(BuildContext context)?, bool validateArguments(Check checkArgument, GetArguments getArgument)?, RouteTransition routeTransition = RouteTransition.slide_right, BuildTransition? customTransition})
const

Properties

builderTrigger → void Function(BuildContext context)?
An optional function that is executed just before the page widget is built.
final
customTransition → BuildTransition?
An optional custom BuildTransition to build custom animations for this route. If provided, this takes precedence over routeTransition.
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, BuildTransition? customTransition, void 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