AppStateX<T extends StatefulWidget> constructor

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

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

Implementation

AppStateX({
  Key? key,
  Widget? home,
  AppStateXController? controller,
  super.controllers,
  super.object,
  super.notifyClientsInBuild,
  super.printEvents,
  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>? generateRoute,
  Route<dynamic>? unknownRoute,
  bool Function(NavigationNotification notification)?
      onNavigationNotification,
  GlobalKey<NavigatorState>? navigatorKey,
  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,
  this.inSwitchUI,
  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,
  RebuildDirtyWidgetCallback? 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,
  AnimationStyle? themeAnimationStyle,
  super.errorHandler,
  super.errorScreen,
  super.errorReport,
  super.inErrorHandler,
  super.inErrorScreen,
  super.inErrorReport,
  super.presentError,
  super.inInitState,
  super.inInitAsync,
  super.inCatchAsyncError,
  super.inAsyncError,
  super.inHome,
  super.inRouteInformationProvider,
  super.inRouteInformationParser,
  super.inRouterDelegate,
  super.inRouterConfig,
  super.inBackButtonDispatcher,
  super.inRoutes,
  super.inInitialRoute,
  super.inGenerateRoute,
  super.inUnknownRoute,
  super.inScaffoldMessengerKey,
  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.inDebugPaintSizeEnabled,
  super.inDebugPaintBaselinesEnabled,
  super.inDebugPaintPointersEnabled,
  super.inDebugPaintLayerBordersEnabled,
  super.inDebugRepaintRainbowEnabled,
  super.inDebugRepaintTextRainbowEnabled,
  super.inDebugPrintRebuildDirtyWidgets,
  super.inDebugOnRebuildDirtyWidget,
  super.inDebugPrintBuildScope,
  super.inDebugPrintScheduleBuildForStacks,
  super.inDebugPrintGlobalKeyedWidgetLifecycle,
  super.inDebugProfileBuildsEnabled,
  super.inDebugProfileBuildsEnabledUserWidgets,
  super.inDebugEnhanceBuildTimelineArguments,
  super.inDebugHighlightDeprecatedWidgets,
  super.inShortcuts,
  super.inActions,
  super.inRestorationScopeId,
  super.inScrollBehavior,
  super.inThemeAnimationStyle,
}) : super(controller: controller ?? AppStateXController()) {
  //
  _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 ?? onSwitchUI() ?? false;

  _routeInformationProvider = routeInformationProvider;
  _routeInformationParser = routeInformationParser;
  _routerDelegate = routerDelegate;
  _useRouterConfig = useRouterConfig ?? true;
  _routerConfig = routerConfig;
  _backButtonDispatcher = backButtonDispatcher;
  _scaffoldMessengerKey = scaffoldMessengerKey;
  _routes = routes;
  _initialRoute = initialRoute;
  _generateRoute = generateRoute;
  _unknownRoute = unknownRoute;
  _onNavigationNotification = onNavigationNotification;
  _navigatorKey = navigatorKey;
  _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 ?? [];

  /// Development tools in Flutter's debug.dart
  this.debugPaintSizeEnabled = debugPaintSizeEnabled;
  this.debugPaintBaselinesEnabled = debugPaintBaselinesEnabled;
  this.debugPaintPointersEnabled = debugPaintPointersEnabled;
  this.debugPaintLayerBordersEnabled = debugPaintLayerBordersEnabled;
  this.debugRepaintRainbowEnabled = debugRepaintRainbowEnabled;
  this.debugRepaintTextRainbowEnabled = debugRepaintTextRainbowEnabled;
  this.debugPrintRebuildDirtyWidgets = debugPrintRebuildDirtyWidgets;
  this.debugOnRebuildDirtyWidget = debugOnRebuildDirtyWidget;
  this.debugPrintBuildScope = debugPrintBuildScope;
  this.debugPrintScheduleBuildForStacks = debugPrintScheduleBuildForStacks;
  this.debugPrintGlobalKeyedWidgetLifecycle =
      debugPrintGlobalKeyedWidgetLifecycle;
  this.debugProfileBuildsEnabled = debugProfileBuildsEnabled;
  this.debugProfileBuildsEnabledUserWidgets =
      debugProfileBuildsEnabledUserWidgets;
  this.debugEnhanceBuildTimelineArguments =
      debugEnhanceBuildTimelineArguments;
  this.debugHighlightDeprecatedWidgets = debugHighlightDeprecatedWidgets;

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

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