GlobalRouteDefiner class
Defines global route-related settings and behaviors for the app router.
This includes the initial route, app title, authorization logic, redirect handling, unauthorized access widget builder, and unknown route handling.
Constructors
- GlobalRouteDefiner.new({required String initialRoute, required String title, Widget loaderBuilder(CurrentRoute currentRoute)?, Widget unauthorizedBuilder(BuildContext, CurrentRoute)?, required MaterialPageRoute onUnknownRoute(RouteSettings, RouteState), RouteOptions defaultRouteOptions = const RouteOptions()})
-
Creates a new GlobalRouteDefiner instance.
const
Properties
- defaultRouteOptions → RouteOptions
-
Global route behavior options applied to all routes unless overridden.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialRoute → String
-
The initial route path to use when the app starts or when
no specific route is given.
final
- loaderBuilder → Widget Function(CurrentRoute currentRoute)?
-
A widget builder invoked while guards run or a redirect occurs.
final
- onUnknownRoute → MaterialPageRoute Function(RouteSettings, RouteState)
-
A function that returns a MaterialPageRoute for unknown routes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
The title of the application.
final
-
A widget builder for unauthorized access cases.
final
Methods
-
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