CustomerMaterialApp.router constructor

const CustomerMaterialApp.router({
  1. Key? key,
  2. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  3. RouteInformationProvider? routeInformationProvider,
  4. required RouteInformationParser<Object> routeInformationParser,
  5. required 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. ThemeData? highContrastTheme,
  14. ThemeData? highContrastDarkTheme,
  15. ThemeMode? themeMode = ThemeMode.system,
  16. Locale? locale,
  17. Iterable<LocalizationsDelegate>? localizationsDelegates,
  18. LocaleListResolutionCallback? localeListResolutionCallback,
  19. LocaleResolutionCallback? localeResolutionCallback,
  20. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  21. bool debugShowMaterialGrid = false,
  22. bool showPerformanceOverlay = false,
  23. bool checkerboardRasterCacheImages = false,
  24. bool checkerboardOffscreenLayers = false,
  25. bool showSemanticsDebugger = false,
  26. bool debugShowCheckedModeBanner = true,
  27. Map<ShortcutActivator, Intent>? shortcuts,
  28. Map<Type, Action<Intent>>? actions,
  29. String? restorationScopeId,
  30. ScrollBehavior? scrollBehavior,
  31. bool useInheritedMediaQuery = false,
  32. List<NavigatorObserver>? navigatorObservers,
})

Creates a MaterialApp that uses the Router instead of a Navigator.

Implementation

const CustomerMaterialApp.router({
  Key? key,
  this.scaffoldMessengerKey,
  this.routeInformationProvider,
  required RouteInformationParser<Object> this.routeInformationParser,
  required RouterDelegate<Object> this.routerDelegate,
  this.backButtonDispatcher,
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  this.color,
  this.theme,
  this.darkTheme,
  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.actions,
  this.restorationScopeId,
  this.scrollBehavior,
  this.useInheritedMediaQuery = false,
  this.navigatorObservers,
})  : assert(routeInformationParser != null),
      assert(routerDelegate != null),
      assert(title != null),
      assert(debugShowMaterialGrid != null),
      assert(showPerformanceOverlay != null),
      assert(checkerboardRasterCacheImages != null),
      assert(checkerboardOffscreenLayers != null),
      assert(showSemanticsDebugger != null),
      assert(debugShowCheckedModeBanner != null),
      navigatorKey = null,
      onGenerateRoute = null,
      home = null,
      onGenerateInitialRoutes = null,
      onUnknownRoute = null,
      routes = null,
      initialRoute = null,
      super(key: key);