FluentApp constructor

const FluentApp({
  1. Key? key,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. RouteFactory? onGenerateRoute,
  4. InitialRouteListFactory? onGenerateInitialRoutes,
  5. RouteFactory? onUnknownRoute,
  6. List<NavigatorObserver>? navigatorObservers = const <NavigatorObserver>[],
  7. String? initialRoute,
  8. Widget? home,
  9. Map<String, WidgetBuilder>? routes = const <String, WidgetBuilder>{},
  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 = const <Locale>[Locale('en', 'US')],
  19. bool showPerformanceOverlay = false,
  20. bool checkerboardRasterCacheImages = false,
  21. bool checkerboardOffscreenLayers = false,
  22. bool showSemanticsDebugger = false,
  23. bool debugShowCheckedModeBanner = true,
  24. Map<LogicalKeySet, Intent>? shortcuts,
  25. Map<Type, Action<Intent>>? actions,
  26. ThemeData? theme,
  27. ThemeData? darkTheme,
  28. ThemeMode? themeMode,
  29. String? restorationScopeId,
})

Creates a FluentApp.

At least one of home, routes, onGenerateRoute, or builder must be non-null. If only routes is given, it must include an entry for the Navigator.defaultRouteName (/), since that is the route used when the application is launched with an intent that specifies an otherwise unsupported route.

This class creates an instance of WidgetsApp.

The boolean arguments, routes, and navigatorObservers, must not be null.

Implementation

const FluentApp({
  Key? key,
  this.navigatorKey,
  this.onGenerateRoute,
  this.onGenerateInitialRoutes,
  this.onUnknownRoute,
  this.navigatorObservers = const <NavigatorObserver>[],
  this.initialRoute,
  this.home,
  this.routes = const <String, WidgetBuilder>{},
  this.builder,
  this.title = '',
  this.onGenerateTitle,
  this.color,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const <Locale>[Locale('en', 'US')],
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.shortcuts,
  this.actions,
  this.theme,
  this.darkTheme,
  this.themeMode,
  this.restorationScopeId,
})  : routeInformationProvider = null,
      routeInformationParser = null,
      routerDelegate = null,
      backButtonDispatcher = null,
      super(key: key);