BaseWidgetsApp constructor

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

Implementation

const BaseWidgetsApp({
  super.key,
  this.home,
  this.title = '',
  this.initState,
  this.dispose,
  this.navigatorKey,
  this.initialRoute,
  this.onGenerateRoute,
  this.onUnknownRoute,
  this.builder,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.onGenerateTitle,
  required this.color,
  this.debugShowCheckedModeBanner = false,
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = 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.shortcuts,
  this.actions,
  this.onGenerateInitialRoutes,
  this.restorationScopeId,
  this.deactivate,
  this.onInactive,
  this.onPaused,
  this.onDetached,
  this.onResumed,
  this.onHidden,
});