TUIApp.router constructor
TUIApp.router({
- Key? key,
- required TUIThemeData theme,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - TUIThemeData? darkTheme,
- ThemeMode? themeMode,
- RouteInformationProvider? routeInformationProvider,
- RouteInformationParser<
Object> ? routeInformationParser, - RouterDelegate<
Object> ? routerDelegate, - BackButtonDispatcher? backButtonDispatcher,
- RouterConfig<
Object> ? routerConfig, - TransitionBuilder? builder,
- String title = '',
- GenerateAppTitle? onGenerateTitle,
- Locale? locale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('en', 'US')], - bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowCheckedModeBanner = true,
- Map<
ShortcutActivator, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - String? restorationScopeId,
Implementation
TUIApp.router({
super.key,
required this.theme,
this.scaffoldMessengerKey,
this.darkTheme,
this.themeMode,
this.routeInformationProvider,
this.routeInformationParser,
this.routerDelegate,
this.backButtonDispatcher,
this.routerConfig,
this.builder,
this.title = '',
this.onGenerateTitle,
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,
}) : assert(() {
if (routerConfig != null) {
assert(
(routeInformationProvider ??
routeInformationParser ??
routerDelegate ??
backButtonDispatcher) ==
null,
'If the routerConfig is provided, all the other router delegates must not be provided',
);
return true;
}
assert(routerDelegate != null,
'Either one of routerDelegate or routerConfig must be provided');
assert(
routeInformationProvider == null || routeInformationParser != null,
'If routeInformationProvider is provided, routeInformationParser must also be provided',
);
return true;
}()),
navigatorObservers = null,
navigatorKey = null,
onGenerateRoute = null,
home = null,
onGenerateInitialRoutes = null,
onUnknownRoute = null,
routes = null,
initialRoute = null;