ShadcnApp.router constructor

const ShadcnApp.router({
  1. Key? key,
  2. RouteInformationProvider? routeInformationProvider,
  3. RouteInformationParser<Object>? routeInformationParser,
  4. RouterDelegate<Object>? routerDelegate,
  5. RouterConfig<Object>? routerConfig,
  6. BackButtonDispatcher? backButtonDispatcher,
  7. TransitionBuilder? builder,
  8. String title = '',
  9. GenerateAppTitle? onGenerateTitle,
  10. NotificationListenerCallback<NavigationNotification>? onNavigationNotification,
  11. Color? color,
  12. Color? background,
  13. required ThemeData theme,
  14. Locale? locale,
  15. Iterable<LocalizationsDelegate>? localizationsDelegates,
  16. LocaleListResolutionCallback? localeListResolutionCallback,
  17. LocaleResolutionCallback? localeResolutionCallback,
  18. Iterable<Locale> supportedLocales = const [Locale('en', 'US')],
  19. bool debugShowMaterialGrid = false,
  20. bool showPerformanceOverlay = false,
  21. bool showSemanticsDebugger = false,
  22. bool debugShowCheckedModeBanner = true,
  23. Map<ShortcutActivator, Intent>? shortcuts,
  24. Map<Type, Action<Intent>>? actions,
  25. String? restorationScopeId,
  26. ScrollBehavior? scrollBehavior,
  27. ThemeData? materialTheme,
  28. CupertinoThemeData? cupertinoTheme,
  29. AdaptiveScaling? scaling,
  30. bool disableBrowserContextMenu = true,
  31. List<Color> initialRecentColors = const [],
  32. int maxRecentColors = 50,
  33. ValueChanged<List<Color>>? onRecentColorsChanged,
  34. bool pixelSnap = true,
  35. bool enableScrollInterception = false,
  36. ThemeData? darkTheme,
  37. ThemeMode themeMode = ThemeMode.system,
  38. OverlayHandler? popoverHandler,
  39. OverlayHandler? tooltipHandler,
  40. OverlayHandler? menuHandler,
  41. bool enableThemeAnimation = true,
})

Implementation

const ShadcnApp.router({
  super.key,
  this.routeInformationProvider,
  this.routeInformationParser,
  this.routerDelegate,
  this.routerConfig,
  this.backButtonDispatcher,
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  this.onNavigationNotification,
  this.color,
  this.background,
  required this.theme,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const [Locale('en', 'US')],
  this.debugShowMaterialGrid = false,
  this.showPerformanceOverlay = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior,
  this.materialTheme,
  this.cupertinoTheme,
  this.scaling,
  this.disableBrowserContextMenu = true,
  this.initialRecentColors = const [],
  this.maxRecentColors = 50,
  this.onRecentColorsChanged,
  this.pixelSnap = true,
  this.enableScrollInterception = false,
  this.darkTheme,
  this.themeMode = ThemeMode.system,
  this.popoverHandler,
  this.tooltipHandler,
  this.menuHandler,
  this.enableThemeAnimation = true,
})  : assert(routerDelegate != null || routerConfig != null),
      navigatorObservers = null,
      navigatorKey = null,
      onGenerateRoute = null,
      home = null,
      onGenerateInitialRoutes = null,
      onUnknownRoute = null,
      routes = null,
      initialRoute = null;