KiteApp.router constructor

const KiteApp.router({
  1. required RouterConfig<Object>? routerConfig,
  2. Key? key,
  3. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  4. TransitionBuilder? builder,
  5. String title = '',
  6. GenerateAppTitle? onGenerateTitle,
  7. NotificationListenerCallback<NavigationNotification>? onNavigationNotification,
  8. Color? color,
  9. ThemeData? theme,
  10. ThemeData? darkTheme,
  11. ThemeMode themeMode = ThemeMode.system,
  12. Duration themeAnimationDuration = kThemeAnimationDuration,
  13. Curve themeAnimationCurve = Curves.linear,
  14. Locale? locale,
  15. Iterable<LocalizationsDelegate>? localizationsDelegates,
  16. LocaleListResolutionCallback? localeListResolutionCallback,
  17. LocaleResolutionCallback? localeResolutionCallback,
  18. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  19. bool showPerformanceOverlay = false,
  20. bool showSemanticsDebugger = false,
  21. bool debugShowCheckedModeBanner = true,
  22. bool debugGrid = false,
  23. bool debugShowKiteBanner = false,
  24. Map<ShortcutActivator, Intent>? shortcuts,
  25. Map<Type, Action<Intent>>? actions,
  26. String? restorationScopeId,
  27. ScrollBehavior scrollBehavior = const MaterialScrollBehavior(),
})

Creates a Router 2.0 Kite application.

KiteApp.router(
  routerConfig: router,
)

Implementation

const KiteApp.router({
  required this.routerConfig,
  super.key,
  this.scaffoldMessengerKey,
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  this.onNavigationNotification,
  this.color,
  this.theme,
  this.darkTheme,
  this.themeMode = ThemeMode.system,
  this.themeAnimationDuration = kThemeAnimationDuration,
  this.themeAnimationCurve = Curves.linear,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const <Locale>[Locale('en', 'US')],
  this.showPerformanceOverlay = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.debugGrid = false,
  this.debugShowKiteBanner = false,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior = const MaterialScrollBehavior(),
}) : navigatorKey = null,
     home = null,
     routes = const <String, WidgetBuilder>{},
     initialRoute = null,
     onGenerateRoute = null,
     onGenerateInitialRoutes = null,
     onUnknownRoute = null,
     navigatorObservers = const <NavigatorObserver>[],
     pageRouteBuilder = null,
     _type = _KiteAppType.router;