BaseMaterialApp constructor

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

Implementation

const BaseMaterialApp({
  super.key,
  this.home,
  this.title = '',
  this.initState,
  this.dispose,
  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.deactivate,
  this.onInactive,
  this.onPaused,
  this.onDetached,
  this.onResumed,
  this.onHidden,
});