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. required ThemeData theme,
  13. Locale? locale,
  14. Iterable<LocalizationsDelegate>? localizationsDelegates,
  15. LocaleListResolutionCallback? localeListResolutionCallback,
  16. LocaleResolutionCallback? localeResolutionCallback,
  17. Iterable<Locale> supportedLocales = const [Locale('en', 'US')],
  18. bool debugShowMaterialGrid = false,
  19. bool showPerformanceOverlay = false,
  20. bool showSemanticsDebugger = false,
  21. bool debugShowCheckedModeBanner = true,
  22. Map<ShortcutActivator, Intent>? shortcuts,
  23. Map<Type, Action<Intent>>? actions,
  24. String? restorationScopeId,
  25. ScrollBehavior? scrollBehavior,
  26. ThemeData? materialTheme,
  27. CupertinoThemeData? cupertinoTheme,
  28. AdaptiveScaling? scaling,
  29. bool disableBrowserContextMenu = true,
  30. List<Color> initialRecentColors = const [],
  31. int maxRecentColors = 50,
  32. ValueChanged<List<Color>>? onRecentColorsChanged,
  33. bool pixelSnap = true,
  34. bool enableScrollInterception = false,
  35. ThemeData? darkTheme,
  36. ThemeMode themeMode = ThemeMode.system,
  37. OverlayHandler? popoverHandler,
  38. OverlayHandler? tooltipHandler,
  39. OverlayHandler? menuHandler,
  40. 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,
  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;