BasicApp constructor
const
BasicApp({
- Key? key,
- List<
SingleChildWidget> providers = const [], - required Widget? home,
- required String title,
- ConsumerBuilder? consumer,
- ValueCallback<
BuildContext> ? initState, - VoidCallback? dispose,
- VoidCallback? inactive,
- VoidCallback? paused,
- VoidCallback? detached,
- VoidCallback? resumed,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeMode themeMode = ThemeMode.system,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - String? initialRoute,
- RouteFactory? onGenerateRoute,
- RouteFactory? onUnknownRoute,
- TransitionBuilder? builder,
- LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- GenerateAppTitle? onGenerateTitle,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- Color? color,
- bool debugShowCheckedModeBanner = false,
- bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowMaterialGrid = false,
- Map<
String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, - Iterable<
LocalizationsDelegate> localizationsDelegates = const <LocalizationsDelegate<dynamic>>[DefaultCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate], - Locale? locale = const Locale('zh'),
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('zh', 'CH'), Locale('en', 'US')], - ScrollBehavior? scrollBehavior,
- Map<
LogicalKeySet, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - InitialRouteListFactory? onGenerateInitialRoutes,
- String? restorationScopeId,
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,
});