FluentApp.router constructor

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

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

Implementation

FluentApp.router({
  super.key,
  this.theme,
  this.darkTheme,
  this.themeMode,
  this.routeInformationProvider,
  this.routeInformationParser,
  this.routerDelegate,
  this.backButtonDispatcher,
  this.routerConfig,
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  this.color,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = FluentLocalizations.supportedLocales,
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior = const FluentScrollBehavior(),
})  : 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;
      }()),
      assert(supportedLocales.isNotEmpty),
      navigatorObservers = null,
      navigatorKey = null,
      onGenerateRoute = null,
      home = null,
      onGenerateInitialRoutes = null,
      onUnknownRoute = null,
      routes = null,
      initialRoute = null;