GetDelegate<T> constructor
GetDelegate<T> ({
- required List<
GetPage< pages,T> > - GetPage<
T> ? notFoundRoute, - TransitionDelegate? transitionDelegate,
- PopMode backButtonPopMode = PopMode.history,
- PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes,
- String? restorationScopeId,
- bool showHashOnUrl = false,
Implementation
GetDelegate({
required List<GetPage<T>> pages,
GetPage<T>? notFoundRoute,
this.navigatorObservers,
this.transitionDelegate,
this.backButtonPopMode = PopMode.history,
this.preventDuplicateHandlingMode =
PreventDuplicateHandlingMode.reorderRoutes,
this.pickPagesForRootNavigator,
this.restorationScopeId,
bool showHashOnUrl = false,
GlobalKey<NavigatorState>? navigatorKey,
}) : 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 !");
}