ZeroApp.router constructor

const ZeroApp.router({
  1. Key? key,
  2. ZeroThemeData? theme,
  3. ZeroThemeData? darkTheme,
  4. ThemeMode? themeMode = ThemeMode.system,
  5. RouteInformationProvider? routeInformationProvider,
  6. RouteInformationParser<Object>? routeInformationParser,
  7. RouterConfig<Object>? routerConfig,
  8. RouterDelegate<Object>? routerDelegate,
  9. BackButtonDispatcher? backButtonDispatcher,
  10. TransitionBuilder? builder,
  11. String title = '',
  12. GenerateAppTitle? onGenerateTitle,
  13. required Color color,
  14. Locale? locale,
  15. Iterable<LocalizationsDelegate>? localizationsDelegates,
  16. LocaleListResolutionCallback? localeListResolutionCallback,
  17. LocaleResolutionCallback? localeResolutionCallback,
  18. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US'), Locale('id', 'ID')],
  19. bool showPerformanceOverlay = false,
  20. bool checkerboardRasterCacheImages = false,
  21. bool checkerboardOffscreenLayers = false,
  22. bool showSemanticsDebugger = false,
  23. bool debugShowCheckedModeBanner = false,
  24. Map<ShortcutActivator, Intent>? shortcuts,
  25. Map<Type, Action<Intent>>? actions,
  26. String? restorationScopeId,
  27. ScrollBehavior? scrollBehavior,
})

Creates a ZeroApp that uses the Router instead of a Navigator.

Implementation

const ZeroApp.router({
  Key? key,
  this.theme,
  this.darkTheme,
  this.themeMode = ThemeMode.system,
  this.routeInformationProvider,
  this.routeInformationParser,
  this.routerConfig,
  this.routerDelegate,
  this.backButtonDispatcher,
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  required Color this.color,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const <Locale>[
    Locale('en', 'US'),
    Locale('id', 'ID')
  ],
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = false,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior,
})  : assert(routerDelegate != null || routerConfig != null),
      navigatorObservers = null,
      navigatorKey = null,
      onGenerateRoute = null,
      home = null,
      onGenerateInitialRoutes = null,
      onUnknownRoute = null,
      routes = null,
      initialRoute = null,
      super(key: key);