CupertinoApp.router constructor Null safety

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. Color? color,
  12. Locale? locale,
  13. Iterable<LocalizationsDelegate>? localizationsDelegates,
  14. LocaleListResolutionCallback? localeListResolutionCallback,
  15. LocaleResolutionCallback? localeResolutionCallback,
  16. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  17. bool showPerformanceOverlay = false,
  18. bool checkerboardRasterCacheImages = false,
  19. bool checkerboardOffscreenLayers = false,
  20. bool showSemanticsDebugger = false,
  21. bool debugShowCheckedModeBanner = true,
  22. Map<ShortcutActivator, Intent>? shortcuts,
  23. Map<Type, Action<Intent>>? actions,
  24. String? restorationScopeId,
  25. ScrollBehavior? scrollBehavior,
  26. 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.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,
  this.useInheritedMediaQuery = false,
}) : assert(routerDelegate != null || routerConfig != null),
     assert(title != null),
     assert(showPerformanceOverlay != null),
     assert(checkerboardRasterCacheImages != null),
     assert(checkerboardOffscreenLayers != null),
     assert(showSemanticsDebugger != null),
     assert(debugShowCheckedModeBanner != null),
     navigatorObservers = null,
     navigatorKey = null,
     onGenerateRoute = null,
     home = null,
     onGenerateInitialRoutes = null,
     onUnknownRoute = null,
     routes = null,
     initialRoute = null;