GlobalRouteDefiner constructor
- required String initialRoute,
- required String title,
- Widget loaderBuilder(
- CurrentRoute currentRoute
- Widget unauthorizedBuilder()?,
- required MaterialPageRoute onUnknownRoute(),
- RouteOptions defaultRouteOptions = const RouteOptions(),
Creates a new GlobalRouteDefiner instance.
initialRoute
and title
are required.
onUnknownRoute
must be provided to handle unknown routes.
The other parameters are optional and provide customization for authorization, redirects, and unauthorized views.
Implementation
const GlobalRouteDefiner({
required this.initialRoute,
required this.title,
this.loaderBuilder,
this.unauthorizedBuilder,
required this.onUnknownRoute,
this.defaultRouteOptions = const RouteOptions(),
});