GetMaterialApp.router constructor
GetMaterialApp.router({
- Key? key,
- RouteInformationProvider? routeInformationProvider,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - RouteInformationParser<
Object> ? routeInformationParser, - RouterDelegate<
Object> ? routerDelegate, - BackButtonDispatcher? backButtonDispatcher,
- TransitionBuilder? builder,
- String title = '',
- GenerateAppTitle? onGenerateTitle,
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- bool useInheritedMediaQuery = false,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- ThemeMode themeMode = ThemeMode.system,
- Locale? locale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('en', 'US')], - bool debugShowMaterialGrid = false,
- bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowCheckedModeBanner = true,
- Map<
LogicalKeySet, Intent> ? shortcuts, - ScrollBehavior? scrollBehavior,
- Map<
Type, Action< ? actions,Intent> > - CustomTransition? customTransition,
- Map<
String, Map< ? translationsKeys,String, String> > - Translations? translations,
- TextDirection? textDirection,
- Locale? fallbackLocale,
- ValueChanged<
Routing?> ? routingCallback, - Transition? defaultTransition,
- bool? opaqueRoute,
- VoidCallback? onInit,
- VoidCallback? onReady,
- VoidCallback? onDispose,
- bool? enableLog = kDebugMode,
- LogWriterCallback? logWriterCallback,
- bool? popGesture,
- SmartManagement smartManagement = SmartManagement.full,
- Bindings? initialBinding,
- Duration? transitionDuration,
- bool? defaultGlobalState,
- List<
GetPage> ? getPages, - GetPage? unknownRoute,
Implementation
GetMaterialApp.router({
Key? key,
this.routeInformationProvider,
this.scaffoldMessengerKey,
RouteInformationParser<Object>? routeInformationParser,
RouterDelegate<Object>? routerDelegate,
this.backButtonDispatcher,
this.builder,
this.title = '',
this.onGenerateTitle,
this.color,
this.theme,
this.darkTheme,
this.useInheritedMediaQuery = false,
this.highContrastTheme,
this.highContrastDarkTheme,
this.themeMode = ThemeMode.system,
this.locale,
this.localizationsDelegates,
this.localeListResolutionCallback,
this.localeResolutionCallback,
this.supportedLocales = const <Locale>[Locale('en', 'US')],
this.debugShowMaterialGrid = false,
this.showPerformanceOverlay = false,
this.checkerboardRasterCacheImages = false,
this.checkerboardOffscreenLayers = false,
this.showSemanticsDebugger = false,
this.debugShowCheckedModeBanner = true,
this.shortcuts,
this.scrollBehavior,
this.actions,
this.customTransition,
this.translationsKeys,
this.translations,
this.textDirection,
this.fallbackLocale,
this.routingCallback,
this.defaultTransition,
this.opaqueRoute,
this.onInit,
this.onReady,
this.onDispose,
this.enableLog = kDebugMode,
this.logWriterCallback,
this.popGesture,
this.smartManagement = SmartManagement.full,
this.initialBinding,
this.transitionDuration,
this.defaultGlobalState,
this.getPages,
this.navigatorObservers,
this.unknownRoute,
}) : routerDelegate = routerDelegate ??= Get.createDelegate(
notFoundRoute: unknownRoute,
),
routeInformationParser =
routeInformationParser ??= Get.createInformationParser(
initialRoute: getPages?.first.name ?? '/',
),
//navigatorObservers = null,
navigatorKey = null,
onGenerateRoute = null,
home = null,
onGenerateInitialRoutes = null,
onUnknownRoute = null,
routes = null,
initialRoute = null,
super(key: key) {
Get.routerDelegate = routerDelegate;
Get.routeInformationParser = routeInformationParser;
}