AppStateX<T extends StatefulWidget> constructor
AppStateX<T extends StatefulWidget> ({
- Key? key,
- Widget? home,
- AppStateXController? controller,
- List<
StateXController> ? controllers, - Object? object,
- bool? notifyClientsInBuild,
- bool? printEvents,
- MaterialApp? materialApp,
- CupertinoApp? 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? generateRoute,
- Route? unknownRoute,
- TransitionBuilder? builder,
- String? title,
- String onGenerateTitle(
- BuildContext context
- 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> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- List<
Locale> ? supportedLocales, - bool? useMaterial,
- bool? useCupertino,
- bool? switchUI,
- bool? 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< ? actions,Intent> > - String? restorationScopeId,
- ScrollBehavior? scrollBehavior,
- AnimationStyle? themeAnimationStyle,
- FlutterExceptionHandler? errorHandler,
- ErrorWidgetBuilder? errorScreen,
- ReportErrorHandler? errorReport,
- void inErrorHandler(
- FlutterErrorDetails details
- ErrorWidgetBuilder? inErrorScreen,
- Future<
void> inErrorReport(- Object exception,
- StackTrace stack
- bool? presentError,
- void inInitState()?,
- Future<
bool> inInitAsync()?, - Future<
bool> inCatchAsyncError(- Object error
- void inAsyncError(
- Object error
- Widget? inHome()?,
- RouteInformationProvider inRouteInformationProvider()?,
- RouteInformationParser<
Object> inRouteInformationParser()?, - RouterDelegate<
Object> inRouterDelegate()?, - RouterConfig<
Object> ? inRouterConfig()?, - BackButtonDispatcher inBackButtonDispatcher()?,
- Map<
String, WidgetBuilder> inRoutes()?, - String inInitialRoute()?,
- RouteFactory? inGenerateRoute,
- RouteFactory? inUnknownRoute,
- GlobalKey<
ScaffoldMessengerState> ? inScaffoldMessengerKey()?, - bool inUpdateShouldNotify(
- InheritedWidget oldWidget
- TransitionBuilder inTransBuilder()?,
- String inTitle()?,
- GenerateAppTitle? inGenerateTitle,
- ThemeData? inTheme([
- BuildContext? context
- CupertinoThemeData? iniOSTheme([
- BuildContext? context
- ThemeData? inDarkTheme([
- BuildContext? context
- ThemeData? inHighContrastTheme([
- BuildContext? context
- ThemeData? inHighContrastDarkTheme([
- BuildContext? context
- ThemeMode? inThemeMode()?,
- Duration? inThemeAnimationDuration()?,
- Curve? inThemeAnimationCurve()?,
- Color? inColor()?,
- Locale? inLocale()?,
- Iterable<
LocalizationsDelegate> inLocalizationsDelegates()?, - LocaleListResolutionCallback? inLocaleListResolutionCallback,
- LocaleResolutionCallback? inLocaleResolutionCallback,
- List<
Locale> ? inSupportedLocales()?, - bool? inDebugShowMaterialGrid()?,
- bool? inShowPerformanceOverlay()?,
- bool? inCheckerboardRasterCacheImages()?,
- bool? inCheckerboardOffscreenLayers()?,
- bool? inShowSemanticsDebugger()?,
- bool? inDebugShowCheckedModeBanner()?,
- BooleanFunctionIndicatorCallback? inDebugPaintSizeEnabled,
- BooleanFunctionIndicatorCallback? inDebugPaintBaselinesEnabled,
- BooleanFunctionIndicatorCallback? inDebugPaintPointersEnabled,
- BooleanFunctionIndicatorCallback? inDebugPaintLayerBordersEnabled,
- BooleanFunctionIndicatorCallback? inDebugRepaintRainbowEnabled,
- BooleanFunctionIndicatorCallback? inDebugRepaintTextRainbowEnabled,
- BooleanFunctionIndicatorCallback? inDebugPrintRebuildDirtyWidgets,
- RebuildDirtyWidgetCallback? inDebugOnRebuildDirtyWidget,
- BooleanFunctionIndicatorCallback? inDebugPrintBuildScope,
- BooleanFunctionIndicatorCallback? inDebugPrintScheduleBuildForStacks,
- BooleanFunctionIndicatorCallback? inDebugPrintGlobalKeyedWidgetLifecycle,
- BooleanFunctionIndicatorCallback? inDebugProfileBuildsEnabled,
- BooleanFunctionIndicatorCallback? inDebugProfileBuildsEnabledUserWidgets,
- BooleanFunctionIndicatorCallback? inDebugEnhanceBuildTimelineArguments,
- BooleanFunctionIndicatorCallback? inDebugHighlightDeprecatedWidgets,
- Map<
LogicalKeySet, Intent> ? inShortcuts()?, - Map<
Type, Action< ? inActions()?,Intent> > - String? inRestorationScopeId()?,
- ScrollBehavior? inScrollBehavior()?,
- 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;
}