CKApp.delegate constructor
const
CKApp.delegate({
- required ckcoreBrand brand,
- required RouterDelegate<
Object> routerDelegate, - required RouteInformationParser<
Object> routeInformationParser, - RouteInformationProvider? routeInformationProvider,
- Key? key,
- Brightness? brightness,
- bool responsive = false,
- TransitionBuilder? builder,
- String title = '',
- GenerateAppTitle? onGenerateTitle,
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- ThemeMode themeMode = ThemeMode.system,
- Locale? locale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('en', 'US')], - bool debugShowMaterialGrid = false,
- bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowCheckedModeBanner = true,
- Map<
LogicalKeySet, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - String? restorationScopeId,
- ScrollBehavior? scrollBehavior,
- 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;