GetDelegate constructor
GetDelegate({
- GetPage? notFoundRoute,
- TransitionDelegate? transitionDelegate,
- PopMode backButtonPopMode = PopMode.history,
- PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes,
- String? restorationScopeId,
- bool showHashOnUrl = false,
- required List<
GetPage> pages,
Implementation
GetDelegate({
GetPage? notFoundRoute,
this.navigatorObservers,
this.transitionDelegate,
this.backButtonPopMode = PopMode.history,
this.preventDuplicateHandlingMode =
PreventDuplicateHandlingMode.reorderRoutes,
this.pickPagesForRootNavigator,
this.restorationScopeId,
bool showHashOnUrl = false,
GlobalKey<NavigatorState>? navigatorKey,
required List<GetPage> pages,
}) : navigatorKey = navigatorKey ?? GlobalKey<NavigatorState>(),
notFoundRoute = notFoundRoute ??= GetPage(
name: '/404',
page: () => const Scaffold(
body: Center(child: Text('Route not found')),
),
) {
if (!showHashOnUrl && GetPlatform.isWeb) setUrlStrategy();
addPages(pages);
addPage(notFoundRoute);
Get.log('GetDelegate is created !');
}