BasicApp constructor

const BasicApp({
  1. Key? key,
  2. List<SingleChildWidget> providers = const [],
  3. required Widget? home,
  4. required String title,
  5. ConsumerBuilder? consumer,
  6. ValueCallback<BuildContext>? initState,
  7. VoidCallback? dispose,
  8. VoidCallback? inactive,
  9. VoidCallback? paused,
  10. VoidCallback? detached,
  11. VoidCallback? resumed,
  12. ThemeData? theme,
  13. ThemeData? darkTheme,
  14. ThemeMode themeMode = ThemeMode.system,
  15. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  16. GlobalKey<NavigatorState>? navigatorKey,
  17. String? initialRoute,
  18. RouteFactory? onGenerateRoute,
  19. RouteFactory? onUnknownRoute,
  20. TransitionBuilder? builder,
  21. LocaleListResolutionCallback? localeListResolutionCallback,
  22. LocaleResolutionCallback? localeResolutionCallback,
  23. GenerateAppTitle? onGenerateTitle,
  24. ThemeData? highContrastTheme,
  25. ThemeData? highContrastDarkTheme,
  26. Color? color,
  27. bool debugShowCheckedModeBanner = false,
  28. bool showPerformanceOverlay = false,
  29. bool checkerboardRasterCacheImages = false,
  30. bool checkerboardOffscreenLayers = false,
  31. bool showSemanticsDebugger = false,
  32. bool debugShowMaterialGrid = false,
  33. Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{},
  34. List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[],
  35. Iterable<LocalizationsDelegate> localizationsDelegates = const <LocalizationsDelegate<dynamic>>[DefaultCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate],
  36. Locale? locale = const Locale('zh'),
  37. Iterable<Locale> supportedLocales = const <Locale>[Locale('zh', 'CH'), Locale('en', 'US')],
  38. ScrollBehavior? scrollBehavior,
  39. Map<LogicalKeySet, Intent>? shortcuts,
  40. Map<Type, Action<Intent>>? actions,
  41. InitialRouteListFactory? onGenerateInitialRoutes,
  42. String? restorationScopeId,
  43. VoidCallback? hidden,
})

Implementation

const BasicApp({
  super.key,
  this.providers = const [],
  required this.home,
  required this.title,
  this.consumer,
  this.initState,
  this.dispose,
  this.inactive,
  this.paused,
  this.detached,
  this.resumed,
  this.theme,
  this.darkTheme,
  this.themeMode = ThemeMode.system,
  this.scaffoldMessengerKey,
  this.navigatorKey,
  this.initialRoute,
  this.onGenerateRoute,
  this.onUnknownRoute,
  this.builder,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.onGenerateTitle,
  this.highContrastTheme,
  this.highContrastDarkTheme,
  this.color,
  this.debugShowCheckedModeBanner = false,
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowMaterialGrid = false,
  this.routes = const <String, WidgetBuilder>{},
  this.navigatorObservers = const <NavigatorObserver>[],
  this.localizationsDelegates = const <LocalizationsDelegate<dynamic>>[
    DefaultCupertinoLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
  ],
  this.locale = const Locale('zh'),
  this.supportedLocales = const <Locale>[
    Locale('zh', 'CH'),
    Locale('en', 'US')
  ],
  this.scrollBehavior,
  this.shortcuts,
  this.actions,
  this.onGenerateInitialRoutes,
  this.restorationScopeId,
  this.hidden,
});