CupertinoApp.router constructor

const CupertinoApp.router({
  1. Key? key,
  2. RouteInformationProvider? routeInformationProvider,
  3. RouteInformationParser<Object>? routeInformationParser,
  4. RouterDelegate<Object>? routerDelegate,
  5. BackButtonDispatcher? backButtonDispatcher,
  6. RouterConfig<Object>? routerConfig,
  7. CupertinoThemeData? theme,
  8. TransitionBuilder? builder,
  9. String? title,
  10. GenerateAppTitle? onGenerateTitle,
  11. NotificationListenerCallback<NavigationNotification>? onNavigationNotification,
  12. Color? color,
  13. Locale? locale,
  14. Iterable<LocalizationsDelegate>? localizationsDelegates,
  15. LocaleListResolutionCallback? localeListResolutionCallback,
  16. LocaleResolutionCallback? localeResolutionCallback,
  17. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  18. bool showPerformanceOverlay = false,
  19. bool checkerboardRasterCacheImages = false,
  20. bool checkerboardOffscreenLayers = false,
  21. bool showSemanticsDebugger = false,
  22. bool debugShowCheckedModeBanner = true,
  23. Map<ShortcutActivator, Intent>? shortcuts,
  24. Map<Type, Action<Intent>>? actions,
  25. String? restorationScopeId,
  26. ScrollBehavior? scrollBehavior,
  27. @Deprecated('Remove this parameter as it is now ignored. ' 'CupertinoApp never introduces its own MediaQuery; the View widget takes care of that. ' 'This feature was deprecated after v3.7.0-29.0.pre.') bool useInheritedMediaQuery = false,
})

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

If the routerConfig is provided, the other router related delegates, routeInformationParser, routeInformationProvider, routerDelegate, and backButtonDispatcher, must all be null.

Implementation

const CupertinoApp.router({
  super.key,
  this.routeInformationProvider,
  this.routeInformationParser,
  this.routerDelegate,
  this.backButtonDispatcher,
  this.routerConfig,
  this.theme,
  this.builder,
  this.title,
  this.onGenerateTitle,
  this.onNavigationNotification,
  this.color,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const <Locale>[Locale('en', 'US')],
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior,
  @Deprecated(
    'Remove this parameter as it is now ignored. '
    'CupertinoApp never introduces its own MediaQuery; the View widget takes care of that. '
    'This feature was deprecated after v3.7.0-29.0.pre.'
  )
  this.useInheritedMediaQuery = false,
}) : assert(routerDelegate != null || routerConfig != null),
     navigatorObservers = null,
     navigatorKey = null,
     onGenerateRoute = null,
     home = null,
     onGenerateInitialRoutes = null,
     onUnknownRoute = null,
     routes = null,
     initialRoute = null;