AppState class

The View for the app. The 'look and feel' for the whole app.

Inheritance
Implemented types
Implementers

Constructors

AppState({Key? key, Widget? home, AppController? con, List<ControllerMVC>? controllers, Object? object, GlobalKey<NavigatorState>? navigatorKey, RouteInformationProvider? routeInformationProvider, RouteInformationParser<Object>? routeInformationParser, RouterDelegate<Object>? routerDelegate, BackButtonDispatcher? backButtonDispatcher, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, Map<String, WidgetBuilder>? routes, String? initialRoute, RouteFactory? onGenerateRoute, RouteFactory? onUnknownRoute, List<NavigatorObserver>? navigatorObservers, TransitionBuilder? builder, String? title, GenerateAppTitle? onGenerateTitle, ThemeData? theme, CupertinoThemeData? iOSTheme, ThemeData? darkTheme, ThemeMode? themeMode, Color? color, Locale? locale, Iterable<LocalizationsDelegate>? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale>? supportedLocales, bool? useMaterial, bool? useCupertino, bool? switchUI, bool? debugShowMaterialGrid, bool? showPerformanceOverlay, bool? checkerboardRasterCacheImages, bool? checkerboardOffscreenLayers, bool? showSemanticsDebugger, bool? debugShowCheckedModeBanner, Map<LogicalKeySet, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, String? restorationScopeId, ScrollBehavior? scrollBehavior, bool? debugShowWidgetInspector, bool? debugPaintSizeEnabled, bool? debugPaintBaselinesEnabled, bool? debugPaintPointersEnabled, bool? debugPaintLayerBordersEnabled, bool? debugRepaintRainbowEnabled, FlutterExceptionHandler? errorHandler, ErrorWidgetBuilder? errorScreen, ReportErrorHandler? errorReport, Widget inHome()?, RouteInformationProvider inRouteInformationProvider()?, RouteInformationParser<Object> inRouteInformationParser()?, RouterDelegate<Object> inRouterDelegate()?, BackButtonDispatcher inBackButtonDispatcher()?, Map<String, WidgetBuilder> inRoutes()?, String inInitialRoute()?, RouteFactory inOnGenerateRoute()?, RouteFactory inOnUnknownRoute()?, List<NavigatorObserver> inNavigatorObservers()?, TransitionBuilder inTransBuilder()?, String inTitle()?, GenerateAppTitle? inGenerateTitle, ThemeData inTheme()?, CupertinoThemeData iniOSTheme()?, ThemeData inDarkTheme()?, ThemeMode inThemeMode()?, Color inColor()?, Locale inLocale()?, Iterable<LocalizationsDelegate> inLocalizationsDelegates()?, LocaleListResolutionCallback? inLocaleListResolutionCallback, LocaleResolutionCallback? inLocaleResolutionCallback, Iterable<Locale> inSupportedLocales()?, bool inDebugShowMaterialGrid()?, bool inShowPerformanceOverlay()?, bool inCheckerboardRasterCacheImages()?, bool inCheckerboardOffscreenLayers()?, bool inShowSemanticsDebugger()?, bool inDebugShowCheckedModeBanner()?, Map<LogicalKeySet, Intent> inShortcuts()?, Map<Type, Action<Intent>> inActions()?, String inRestorationScopeId()?, ScrollBehavior inScrollBehavior()?, void inError(FlutterErrorDetails details)?, bool inAsyncError(FlutterErrorDetails details)?})

Properties

actions Map<Type, Action<Intent>>?
getter/setter pairinherited
backButtonDispatcher BackButtonDispatcher?
getter/setter pairinherited
builder TransitionBuilder?
getter/setter pairinherited
checkerboardOffscreenLayers bool?
getter/setter pairinherited
checkerboardRasterCacheImages bool?
getter/setter pairinherited
color Color?
getter/setter pairinherited
con AppController?
finalinherited
context BuildContext
The location in the tree where this widget builds.
no setterinherited
controller → ControllerMVC
Provide the 'main' controller to this 'State View.' If _controller == null, get the 'first assigned' controller.
no setterinherited
controllers List<ControllerMVC>?
finalinherited
currentErrorFunc FlutterExceptionHandler?
Save the current Error Handler.
finalinherited
darkTheme ThemeData?
getter/setter pairinherited
debugPaintBaselinesEnabled bool?
getter/setter pairinherited
debugPaintLayerBordersEnabled bool?
getter/setter pairinherited
debugPaintPointersEnabled bool?
getter/setter pairinherited
debugPaintSizeEnabled bool?
Highlights UI while debugging.
getter/setter pairinherited
debugRepaintRainbowEnabled bool?
getter/setter pairinherited
debugShowCheckedModeBanner bool?
getter/setter pairinherited
debugShowMaterialGrid bool?
getter/setter pairinherited
debugShowWidgetInspector bool?
getter/setter pairinherited
firstCon → ControllerMVC
Returns 'the first' Controller associated with this StateMVC object.
no setterinherited
futureBuilt bool
A flag indicating initAsync was called
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
home Widget?
final
inActions Map<Type, Action<Intent>> Function()?
final
inAsyncError bool Function(FlutterErrorDetails details)?
final
inBackButtonDispatcher BackButtonDispatcher Function()?
final
inBuilder bool
getter/setter pairinherited
inCheckerboardOffscreenLayers bool Function()?
final
inCheckerboardRasterCacheImages bool Function()?
final
inColor Color Function()?
final
inDarkTheme ThemeData Function()?
final
inDebugShowCheckedModeBanner bool Function()?
final
inDebugShowMaterialGrid bool Function()?
final
inError → void Function(FlutterErrorDetails details)?
final
inGenerateTitle GenerateAppTitle?
final
inHome Widget Function()?
final
inInitialRoute String Function()?
final
iniOSTheme CupertinoThemeData Function()?
final
initialRoute String?
getter/setter pairinherited
inLocale Locale Function()?
final
inLocaleListResolutionCallback LocaleListResolutionCallback?
final
inLocaleResolutionCallback LocaleResolutionCallback?
final
inLocalizationsDelegates Iterable<LocalizationsDelegate> Function()?
final
inNavigatorObservers List<NavigatorObserver> Function()?
final
inOnGenerateRoute RouteFactory Function()?
final
inOnUnknownRoute RouteFactory Function()?
final
inRestorationScopeId String Function()?
final
inRouteInformationParser RouteInformationParser<Object> Function()?
final
inRouteInformationProvider RouteInformationProvider Function()?
final
inRouterDelegate RouterDelegate<Object> Function()?
final
inRoutes Map<String, WidgetBuilder> Function()?
final
inScrollBehavior ScrollBehavior Function()?
final
inShortcuts Map<LogicalKeySet, Intent> Function()?
final
inShowPerformanceOverlay bool Function()?
final
inShowSemanticsDebugger bool Function()?
final
inSupportedLocales Iterable<Locale> Function()?
final
inTheme ThemeData Function()?
final
inThemeMode ThemeMode Function()?
final
inTitle String Function()?
final
inTransBuilder TransitionBuilder Function()?
final
iOSTheme CupertinoThemeData?
finalinherited
isCupertino bool?
no setter
isMaterial bool?
no setter
key Key?
getter/setter pair
keyId String
The unique key identifier for this State object.
no setterinherited
locale Locale?
getter/setter pairinherited
localeListResolutionCallback LocaleListResolutionCallback?
getter/setter pairinherited
localeResolutionCallback LocaleResolutionCallback?
getter/setter pairinherited
localizationsDelegates Iterable<LocalizationsDelegate>?
getter/setter pairinherited
map Map<String, ControllerMVC>
Returns a Map containing all the 'Controllers' associated with this StateMVC object each with their unique 'key' identifier.
no setterinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
All the fields found in the widgets, MaterialApp and CupertinoApp
getter/setter pairinherited
getter/setter pairinherited
object Object?
This is of type Object allowing you to propagate any class object you wish down the widget tree.
getter/setter pairinherited
onGenerateRoute RouteFactory?
getter/setter pairinherited
onGenerateTitle GenerateAppTitle?
getter/setter pairinherited
onUnknownRoute RouteFactory?
getter/setter pairinherited
restorationScopeId String?
getter/setter pairinherited
routeInformationParser RouteInformationParser<Object>?
getter/setter pairinherited
routeInformationProvider RouteInformationProvider?
getter/setter pairinherited
routerDelegate RouterDelegate<Object>?
getter/setter pairinherited
routes Map<String, WidgetBuilder>?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldMessengerKey GlobalKey<ScaffoldMessengerState>?
getter/setter pairinherited
scrollBehavior ScrollBehavior?
getter/setter pairinherited
setStates bool
getter/setter pairinherited
shortcuts Map<LogicalKeySet, Intent>?
getter/setter pairinherited
showPerformanceOverlay bool?
getter/setter pairinherited
showSemanticsDebugger bool?
getter/setter pairinherited
supportedLocales Iterable<Locale>?
getter/setter pairinherited
switchUI bool?
getter/setter pair
theme ThemeData?
finalinherited
themeMode ThemeMode?
getter/setter pairinherited
title String?
getter/setter pairinherited
useCupertino bool?
getter/setter pair
useMaterial bool?
getter/setter pair
widget AppStateWidget
You need to be able access the widget.
no setterinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
add(ControllerMVC? c) String
Add a specific Controller to this View. Returns the Controller's unique String identifier.
inherited
addAfterListener(StateListener listener) bool
Add a listener fired 'after' the main controller runs.
inherited
addBeforeListener(StateListener listener) bool
Add a listener fired 'before' the main controller runs.
inherited
addConId(ControllerMVC con) String
Adds a 'Controller' to be associated with this StateMVC object and returns Controller's the unique 'key' identifier assigned to it.
inherited
addList(List<ControllerMVC>? list) → void
Add a list of 'Controllers' to be associated with this StatMVC object.
inherited
addListener(StateListener listener) bool
Add a listener fired 'after' the main controller runs.
inherited
afterContains(StateListener listener) bool
Returns true of the listener specified is already added.
inherited
afterList(List<String> keys) List<StateListener>
inherited
afterListener(String key) StateListener?
Returns the specified 'after' listener.
inherited
beforeContains(StateListener listener) bool
Returns true of the listener specified is already added.
inherited
beforeList(List<String> keys) List<StateListener>
inherited
beforeListener(String key) StateListener?
Returns the specified 'before' listener.
inherited
build(BuildContext context) Widget
The App's View's true build function called the abstract function, buildApp, but also implements a InheritedWidget allowing you to pass down the Widget tree any 'object' you wish.
inherited
buildApp(BuildContext context) Widget
Override to impose your own WidgetsApp (like CupertinoApp or MaterialApp)
override
catchError(Exception? ex) → void
Catch and explicitly handle the error.
inherited
changeUI(String? ui) → void
Explicity change to a particular interface.
contains(ControllerMVC con) bool
Returns true if the specified 'Controller' is associated with this StateMVC object.
inherited
controllerById(String keyId) → ControllerMVC?
Retrieve a Controller by its a unique String identifier.
inherited
controllerByType<U extends ControllerMVC?>() → U?
Retrieve a Controller in the widget tree by type. Retrieve a Controller in the MVC framework by type.
inherited
deactivate() → void
The framework calls this method whenever it removes this State object from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features.
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes. This method is also called immediately after initState.
inherited
didChangeLocale(Locale locale) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
inherited
didChangeLocales(List<Locale>? locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated.
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes.
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
inherited
didChangeViewFocus(ViewFocusEvent event) → void
Called whenever the PlatformDispatcher receives a notification that the focus state on a view has changed.
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory.
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route. For example, on Android, this is called when the user presses the back button. Observers are notified in registration order until one returns true. If none return true, the application quits.
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the app to push a new route onto the navigator.
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router.
inherited
didRequestAppExit() Future<AppExitResponse>
Called when a request is received from the system to exit the application.
inherited
didUpdateWidget(covariant StatefulWidget oldWidget) → void
Override this method to respond when the widget changes (e.g., to start implicit animations).
inherited
dispose() → void
The framework calls this method when this StateMVC object will never build again.
override
handleCancelBackGesture() → void
Called when a predictive back gesture is canceled, indicating that no navigation should occur.
inherited
handleCommitBackGesture() → void
Called when a predictive back gesture is finished successfully, indicating that the current route should be popped.
inherited
handleStartBackGesture(PredictiveBackEvent backEvent) bool
Called at the start of a predictive back gesture.
inherited
handleUpdateBackGestureProgress(PredictiveBackEvent backEvent) → void
Called when a predictive back gesture moves.
inherited
initAsync() Future<bool>
Initialize any 'time-consuming' operations at the beginning. Initialize asynchronous items essential to the Mobile Applications. Typically called within a FutureBuilder() widget.
inherited
initState() → void
The App State's initialization function.
override
listControllers(List<String> keys) List<ControllerMVC?>
Returns the list of 'Controllers' associated with this StateMVC object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onActions() Map<Type, Action<Intent>>?
onAsyncError(FlutterErrorDetails details) bool
Supply an 'error handler' routine if something goes wrong in the corresponding initAsync() routine.
override
onBackButtonDispatcher() BackButtonDispatcher?
onBuilder() TransitionBuilder?
onCheckerboardOffscreenLayers() bool
onCheckerboardRasterCacheImages() bool
onColor() Color?
onDarkTheme() ThemeData?
onDebugShowCheckedModeBanner() bool
onDebugShowMaterialGrid() bool
onError(FlutterErrorDetails details) → void
Override if you like to customize error handling.
override
onHome() Widget?
onInitialRoute() String?
oniOSTheme() CupertinoThemeData?
onLocale() Locale?
onLocaleListResolutionCallback() LocaleListResolutionCallback?
onLocaleResolutionCallback() LocaleResolutionCallback?
Turn to the I10n class to provide the locale.
onLocalizationsDelegates() Iterable<LocalizationsDelegate>
onNavigatorKey() GlobalKey<NavigatorState>
onNavigatorObservers() List<NavigatorObserver>?
onOnGenerateRoute() RouteFactory?
onOnGenerateTitle(BuildContext context) GenerateAppTitle?
onOnUnknownRoute() RouteFactory?
onRestorationScopeId() String?
onRouteInformationParser() RouteInformationParser<Object>?
onRouteInformationProvider() RouteInformationProvider?
onRouterDelegate() RouterDelegate<Object>?
onRoutes() Map<String, WidgetBuilder>?
onScaffoldMessengerKey() GlobalKey<ScaffoldMessengerState>
onScrollBehavior() ScrollBehavior?
onShortcuts() Map<LogicalKeySet, Intent>?
onShowPerformanceOverlay() bool
onShowSemanticsDebugger() bool
onSupportedLocales() Iterable<Locale>
onTheme() ThemeData?
onThemeMode() ThemeMode
onTitle() String
reassemble() → void
During development, if a hot reload occurs, the reassemble method is called.
override
refresh() → void
Calls the State object's refresh() function if not already in the SetState.builder() function (see class SetState below). The refresh() function is just another name used to call the State object's setState() function.
inherited
remove(String keyId) bool
Remove a specific associated 'Controller' from this StateMVC object by using its unique 'key' identifier.
inherited
removeListener(StateListener listener) bool
Removes the specified listener.
inherited
setState(VoidCallback fn) → void
Calls the State object's setState() function if not already in the SetState.builder() function (see class SetState below).
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

homeKey Key
Supply to the 'home' StatefulWidget Allows you to 're-create' the home widget's state object.
getter/setter pair