CKApp.delegate constructor

const CKApp.delegate({
  1. required ckcoreBrand brand,
  2. required RouterDelegate<Object> routerDelegate,
  3. required RouteInformationParser<Object> routeInformationParser,
  4. RouteInformationProvider? routeInformationProvider,
  5. Key? key,
  6. Brightness? brightness,
  7. bool responsive = false,
  8. TransitionBuilder? builder,
  9. String title = '',
  10. GenerateAppTitle? onGenerateTitle,
  11. Color? color,
  12. ThemeData? theme,
  13. ThemeData? darkTheme,
  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. Map<Type, Action<Intent>>? actions,
  30. String? restorationScopeId,
  31. ScrollBehavior? scrollBehavior,
  32. bool useInheritedMediaQuery = false,
})

Creates a CKApp for routing scenarios using separate router components.

This constructor allows direct use of router delegate and parser, making it compatible with packages like Stacked.

Example:

CKApp.delegate(
  brand: ckcoreBrand.castleKeep,
  routerDelegate: stackedRouter.delegate(),
  routeInformationParser: stackedRouter.defaultRouteParser(),
)

Implementation

const CKApp.delegate({
  required this.brand,
  required RouterDelegate<Object> routerDelegate,
  required RouteInformationParser<Object> routeInformationParser,
  RouteInformationProvider? routeInformationProvider,
  super.key,
  this.brightness,
  this.responsive = false,
  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,
}) : navigatorKey = null,
     home = null,
     routes = const <String, WidgetBuilder>{},
     initialRoute = null,
     onGenerateRoute = null,
     onUnknownRoute = null,
     navigatorObservers = const <NavigatorObserver>[],
     _routerConfig = null,
     _routerDelegate = routerDelegate,
     _routeInformationParser = routeInformationParser,
     _routeInformationProvider = routeInformationProvider;