GetMaterialApp.router constructor

GetMaterialApp.router({
  1. Key? key,
  2. RouteInformationProvider? routeInformationProvider,
  3. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  4. RouteInformationParser<Object>? routeInformationParser,
  5. RouterDelegate<Object>? routerDelegate,
  6. BackButtonDispatcher? backButtonDispatcher,
  7. TransitionBuilder? builder,
  8. String title = '',
  9. GenerateAppTitle? onGenerateTitle,
  10. Color? color,
  11. ThemeData? theme,
  12. ThemeData? darkTheme,
  13. bool useInheritedMediaQuery = false,
  14. ThemeData? highContrastTheme,
  15. ThemeData? highContrastDarkTheme,
  16. ThemeMode themeMode = ThemeMode.system,
  17. Locale? locale,
  18. Iterable<LocalizationsDelegate>? localizationsDelegates,
  19. LocaleListResolutionCallback? localeListResolutionCallback,
  20. LocaleResolutionCallback? localeResolutionCallback,
  21. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  22. bool debugShowMaterialGrid = false,
  23. bool showPerformanceOverlay = false,
  24. bool checkerboardRasterCacheImages = false,
  25. bool checkerboardOffscreenLayers = false,
  26. bool showSemanticsDebugger = false,
  27. bool debugShowCheckedModeBanner = true,
  28. Map<LogicalKeySet, Intent>? shortcuts,
  29. ScrollBehavior? scrollBehavior,
  30. Map<Type, Action<Intent>>? actions,
  31. CustomTransition? customTransition,
  32. Map<String, Map<String, String>>? translationsKeys,
  33. Translations? translations,
  34. TextDirection? textDirection,
  35. Locale? fallbackLocale,
  36. ValueChanged<Routing?>? routingCallback,
  37. Transition? defaultTransition,
  38. bool? opaqueRoute,
  39. VoidCallback? onInit,
  40. VoidCallback? onReady,
  41. VoidCallback? onDispose,
  42. bool? enableLog = kDebugMode,
  43. LogWriterCallback? logWriterCallback,
  44. bool? popGesture,
  45. SmartManagement smartManagement = SmartManagement.full,
  46. Bindings? initialBinding,
  47. Duration? transitionDuration,
  48. bool? defaultGlobalState,
  49. List<GetPage>? getPages,
  50. List<NavigatorObserver>? navigatorObservers,
  51. 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;
}