AppState<T extends StatefulWidget> constructor

AppState<T extends StatefulWidget>({
  1. Key? key,
  2. Widget? home,
  3. AppController? controller,
  4. List<StateXController>? controllers,
  5. Object? object,
  6. MaterialApp? materialApp,
  7. CupertinoApp? cupertinoApp,
  8. RouteInformationProvider? routeInformationProvider,
  9. RouteInformationParser<Object>? routeInformationParser,
  10. RouterDelegate<Object>? routerDelegate,
  11. bool? useRouterConfig,
  12. RouterConfig<Object>? routerConfig,
  13. BackButtonDispatcher? backButtonDispatcher,
  14. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  15. Map<String, WidgetBuilder>? routes,
  16. String? initialRoute,
  17. Route? onGenerateRoute(
    1. RouteSettings settings
    )?,
  18. Route? onUnknownRoute(
    1. RouteSettings settings
    )?,
  19. bool onNavigationNotification(
    1. NavigationNotification notification
    )?,
  20. List<NavigatorObserver>? navigatorObservers,
  21. TransitionBuilder? builder,
  22. String? title,
  23. String onGenerateTitle(
    1. BuildContext context
    )?,
  24. Color? color,
  25. bool? allowChangeTheme,
  26. ThemeData? theme,
  27. CupertinoThemeData? iOSTheme,
  28. ThemeData? darkTheme,
  29. ThemeData? highContrastTheme,
  30. ThemeData? highContrastDarkTheme,
  31. ThemeMode? themeMode,
  32. Duration? themeAnimationDuration,
  33. Curve? themeAnimationCurve,
  34. bool? allowChangeLocale,
  35. Locale? locale,
  36. Iterable<LocalizationsDelegate>? localizationsDelegates,
  37. LocaleListResolutionCallback? localeListResolutionCallback,
  38. LocaleResolutionCallback? localeResolutionCallback,
  39. List<Locale>? supportedLocales,
  40. bool? useMaterial,
  41. bool? useCupertino,
  42. bool? switchUI,
  43. bool? allowChangeUI,
  44. bool? debugShowMaterialGrid,
  45. bool? showPerformanceOverlay,
  46. bool? checkerboardRasterCacheImages,
  47. bool? checkerboardOffscreenLayers,
  48. bool? showSemanticsDebugger,
  49. bool? debugShowCheckedModeBanner,
  50. bool? debugShowWidgetInspector,
  51. bool? debugPaintSizeEnabled,
  52. bool? debugPaintBaselinesEnabled,
  53. bool? debugPaintPointersEnabled,
  54. bool? debugPaintLayerBordersEnabled,
  55. bool? debugRepaintRainbowEnabled,
  56. bool? debugRepaintTextRainbowEnabled,
  57. bool? debugPrintRebuildDirtyWidgets,
  58. void debugOnRebuildDirtyWidget(
    1. Element e,
    2. bool builtOnce
    )?,
  59. bool? debugPrintBuildScope,
  60. bool? debugPrintScheduleBuildForStacks,
  61. bool? debugPrintGlobalKeyedWidgetLifecycle,
  62. bool? debugProfileBuildsEnabled,
  63. bool? debugProfileBuildsEnabledUserWidgets,
  64. bool? debugEnhanceBuildTimelineArguments,
  65. bool? debugHighlightDeprecatedWidgets,
  66. Map<LogicalKeySet, Intent>? shortcuts,
  67. Map<Type, Action<Intent>>? actions,
  68. String? restorationScopeId,
  69. ScrollBehavior? scrollBehavior,
  70. FlutterExceptionHandler? errorHandler,
  71. ErrorWidgetBuilder? errorScreen,
  72. ReportErrorHandler? errorReport,
  73. void inErrorHandler(
    1. FlutterErrorDetails details
    )?,
  74. ErrorWidgetBuilder? inErrorScreen,
  75. Future<void> inErrorReport(
    1. Object exception,
    2. StackTrace stack
    )?,
  76. void inError(
    1. FlutterErrorDetails details
    )?,
  77. bool? presentError,
  78. void inInitState()?,
  79. Future<bool> inInitAsync()?,
  80. Widget inHome()?,
  81. RouteInformationProvider inRouteInformationProvider()?,
  82. RouteInformationParser<Object> inRouteInformationParser()?,
  83. RouterDelegate<Object> inRouterDelegate()?,
  84. RouterConfig<Object>? inRouterConfig()?,
  85. BackButtonDispatcher inBackButtonDispatcher()?,
  86. Map<String, WidgetBuilder> inRoutes()?,
  87. String inInitialRoute()?,
  88. List<NavigatorObserver> inNavigatorObservers()?,
  89. bool inUpdateShouldNotify(
    1. InheritedWidget oldWidget
    )?,
  90. TransitionBuilder inTransBuilder()?,
  91. String inTitle()?,
  92. GenerateAppTitle? inGenerateTitle,
  93. ThemeData? inTheme()?,
  94. CupertinoThemeData? iniOSTheme()?,
  95. ThemeData? inDarkTheme()?,
  96. ThemeData? inHighContrastTheme()?,
  97. ThemeData? inHighContrastDarkTheme()?,
  98. ThemeMode? inThemeMode()?,
  99. Duration? inThemeAnimationDuration()?,
  100. Curve? inThemeAnimationCurve()?,
  101. Color? inColor()?,
  102. Locale? inLocale()?,
  103. Iterable<LocalizationsDelegate> inLocalizationsDelegates()?,
  104. LocaleListResolutionCallback? inLocaleListResolutionCallback,
  105. LocaleResolutionCallback? inLocaleResolutionCallback,
  106. List<Locale>? inSupportedLocales()?,
  107. bool? inDebugShowMaterialGrid()?,
  108. bool? inShowPerformanceOverlay()?,
  109. bool? inCheckerboardRasterCacheImages()?,
  110. bool? inCheckerboardOffscreenLayers()?,
  111. bool? inShowSemanticsDebugger()?,
  112. bool? inDebugShowCheckedModeBanner()?,
  113. Map<LogicalKeySet, Intent>? inShortcuts()?,
  114. Map<Type, Action<Intent>>? inActions()?,
  115. String? inRestorationScopeId()?,
  116. ScrollBehavior? inScrollBehavior()?,
  117. bool? inAsyncError(
    1. FlutterErrorDetails details
    )?,
})

Provide a huge array of options and features to the 'App State object.'

Implementation

AppState({
  Key? key,
  Widget? home,
  AppController? controller,
  super.controllers,
  super.object,
  super.materialApp,
  super.cupertinoApp,
  RouteInformationProvider? routeInformationProvider,
  RouteInformationParser<Object>? routeInformationParser,
  RouterDelegate<Object>? routerDelegate,
  bool? useRouterConfig,
  RouterConfig<Object>? routerConfig,
  BackButtonDispatcher? backButtonDispatcher,
  GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  Map<String, WidgetBuilder>? routes,
  String? initialRoute,
  Route<dynamic>? Function(RouteSettings settings)? onGenerateRoute,
  Route<dynamic>? Function(RouteSettings settings)? onUnknownRoute,
  bool Function(NavigationNotification notification)?
      onNavigationNotification,
  List<NavigatorObserver>? navigatorObservers,
  TransitionBuilder? builder,
  String? title,
  String Function(BuildContext context)? onGenerateTitle,
  Color? color,
  bool? allowChangeTheme,
  ThemeData? theme,
  CupertinoThemeData? iOSTheme,
  ThemeData? darkTheme,
  ThemeData? highContrastTheme,
  ThemeData? highContrastDarkTheme,
  ThemeMode? themeMode,
  Duration? themeAnimationDuration,
  Curve? themeAnimationCurve,
  bool? allowChangeLocale,
  Locale? locale,
  Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates,
  LocaleListResolutionCallback? localeListResolutionCallback,
  LocaleResolutionCallback? localeResolutionCallback,
  List<Locale>? supportedLocales,
  bool? useMaterial,
  bool? useCupertino,
  bool? switchUI,
  bool? allowChangeUI,
  bool? debugShowMaterialGrid,
  bool? showPerformanceOverlay,
  bool? checkerboardRasterCacheImages,
  bool? checkerboardOffscreenLayers,
  bool? showSemanticsDebugger,
  bool? debugShowCheckedModeBanner,
  bool? debugShowWidgetInspector,
  bool? debugPaintSizeEnabled,
  bool? debugPaintBaselinesEnabled,
  bool? debugPaintPointersEnabled,
  bool? debugPaintLayerBordersEnabled,
  bool? debugRepaintRainbowEnabled,
  bool? debugRepaintTextRainbowEnabled,
  bool? debugPrintRebuildDirtyWidgets,
  // ignore: avoid_positional_boolean_parameters
  void Function(Element e, bool builtOnce)? debugOnRebuildDirtyWidget,
  bool? debugPrintBuildScope,
  bool? debugPrintScheduleBuildForStacks,
  bool? debugPrintGlobalKeyedWidgetLifecycle,
  bool? debugProfileBuildsEnabled,
  bool? debugProfileBuildsEnabledUserWidgets,
  bool? debugEnhanceBuildTimelineArguments,
  bool? debugHighlightDeprecatedWidgets,
  Map<LogicalKeySet, Intent>? shortcuts,
  Map<Type, Action<Intent>>? actions,
  String? restorationScopeId,
  ScrollBehavior? scrollBehavior,
  super.errorHandler,
  super.errorScreen,
  super.errorReport,
  super.inErrorHandler,
  super.inErrorScreen,
  super.inErrorReport,
  super.inError,
  super.presentError,
  super.inInitState,
  super.inInitAsync,
  super.inHome,
  super.inRouteInformationProvider,
  super.inRouteInformationParser,
  super.inRouterDelegate,
  super.inRouterConfig,
  super.inBackButtonDispatcher,
  super.inRoutes,
  super.inInitialRoute,
  super.inNavigatorObservers,
  super.inUpdateShouldNotify,
  super.inTransBuilder,
  super.inTitle,
  super.inGenerateTitle,
  super.inTheme,
  super.iniOSTheme,
  super.inDarkTheme,
  super.inHighContrastTheme,
  super.inHighContrastDarkTheme,
  super.inThemeMode,
  super.inThemeAnimationDuration,
  super.inThemeAnimationCurve,
  super.inColor,
  super.inLocale,
  super.inLocalizationsDelegates,
  super.inLocaleListResolutionCallback,
  super.inLocaleResolutionCallback,
  super.inSupportedLocales,
  super.inDebugShowMaterialGrid,
  super.inShowPerformanceOverlay,
  super.inCheckerboardRasterCacheImages,
  super.inCheckerboardOffscreenLayers,
  super.inShowSemanticsDebugger,
  super.inDebugShowCheckedModeBanner,
  super.inShortcuts,
  super.inActions,
  super.inRestorationScopeId,
  super.inScrollBehavior,
  super.inAsyncError,
}) : super(controller: controller ?? AppController()) {
  //
  _key = key;
  _home = home;
  _title = title ?? '';

  // Determine what the app can change at runtime
  _allowChangeTheme = allowChangeTheme ?? false;
  _allowChangeLocale = allowChangeLocale ?? false;
  _allowChangeUI = allowChangeUI ?? false;

  // In case null was explicitly passed in.
  _useMaterial = useMaterial ?? false;
  _useCupertino = useCupertino ?? false;
  _switchUI = switchUI ?? false;

  /// Set _useMaterial or _useCupertino to true
  _useMaterialOrCupertino();

  _routeInformationProvider = routeInformationProvider;
  _routeInformationParser = routeInformationParser;
  _routerDelegate = routerDelegate;
  _useRouterConfig = useRouterConfig;
  _routerConfig = routerConfig;
  _backButtonDispatcher = backButtonDispatcher;
  _scaffoldMessengerKey = scaffoldMessengerKey;
  _routes = routes;
  _initialRoute = initialRoute;
  _onGenerateRoute = onGenerateRoute;
  _onUnknownRoute = onUnknownRoute;
  _onNavigationNotification = onNavigationNotification;
  _navigatorObservers = navigatorObservers;
  _transitBuilder = builder;
  _onGenerateTitle = onGenerateTitle;
  _color = color;
  _theme = theme;
  _iOSTheme = iOSTheme;
  _darkTheme = darkTheme;
  _highContrastTheme = highContrastTheme;
  _highContrastDarkTheme = highContrastDarkTheme;
  _themeMode = themeMode;
  _themeAnimationDuration = themeAnimationDuration;
  _themeAnimationCurve = themeAnimationCurve;
  _locale = locale;
  _localizationsDelegates = localizationsDelegates;
  _localeListResolutionCallback = localeListResolutionCallback;
  _localeResolutionCallback = localeResolutionCallback;
  _supportedLocales = supportedLocales ?? [];

  _debugShowMaterialGrid = debugShowMaterialGrid;
  _showPerformanceOverlay = showPerformanceOverlay;
  _checkerboardRasterCacheImages = checkerboardRasterCacheImages;
  _checkerboardOffscreenLayers = checkerboardOffscreenLayers;
  _showSemanticsDebugger = showSemanticsDebugger;
  _debugShowCheckedModeBanner = debugShowCheckedModeBanner;
  _debugShowWidgetInspector = debugShowWidgetInspector;

  this.debugPaintSizeEnabled = debugPaintSizeEnabled ?? false;
  this.debugPaintBaselinesEnabled = debugPaintBaselinesEnabled ?? false;
  this.debugPaintPointersEnabled = debugPaintPointersEnabled ?? false;
  this.debugPaintLayerBordersEnabled = debugPaintLayerBordersEnabled ?? false;
  this.debugRepaintRainbowEnabled = debugRepaintRainbowEnabled ?? false;
  this.debugRepaintTextRainbowEnabled =
      debugRepaintTextRainbowEnabled ?? false;

  this.debugPrintRebuildDirtyWidgets = debugPrintRebuildDirtyWidgets ?? false;
  this.debugOnRebuildDirtyWidget = debugOnRebuildDirtyWidget;
  this.debugPrintBuildScope = debugPrintBuildScope ?? false;
  this.debugPrintScheduleBuildForStacks =
      debugPrintScheduleBuildForStacks ?? false;
  this.debugPrintGlobalKeyedWidgetLifecycle =
      debugPrintGlobalKeyedWidgetLifecycle ?? false;
  this.debugProfileBuildsEnabled = debugProfileBuildsEnabled ?? false;
  this.debugProfileBuildsEnabledUserWidgets =
      debugProfileBuildsEnabledUserWidgets ?? false;
  this.debugEnhanceBuildTimelineArguments =
      debugEnhanceBuildTimelineArguments ?? false;
  this.debugHighlightDeprecatedWidgets =
      debugHighlightDeprecatedWidgets ?? false;

  _shortcuts = shortcuts;
  _actions = actions;
  _restorationScopeId = restorationScopeId;
  _scrollBehavior = scrollBehavior;
}