StateMVC<T extends StatefulWidget> class abstract

The State Object seen as the 'View of the State.' Uses the mixins: WidgetsBindingObserver, _ControllerList, _StateListeners

Inheritance
Implemented types
Mixed in types
Implementers

Constructors

StateMVC([ControllerMVC? _controller])
With an optional Controller parameter, this constructor imposes its own Error Handler.

Properties

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 setter
currentErrorFunc FlutterExceptionHandler?
Save the current Error Handler.
final
firstCon ControllerMVC
Returns 'the first' Controller associated with this StateMVC object.
no setterinherited
futureBuilt bool
A flag indicating initAsync was called
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyId String
The unique key identifier for this State object.
no setteroverride
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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget → T
You need to be able access the widget.
no setteroverride

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.
override
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.
override
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 View!
override
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.
controllerByType<U extends ControllerMVC?>() → U?
Retrieve a Controller in the widget tree by type. Retrieve a Controller in the MVC framework by type.
deactivate() → void
The framework calls this method whenever it removes this State object from the tree.
override
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.
override
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground.
override
didChangeDependencies() → void
Called when a dependency of this State object changes. This method is also called immediately after initState.
override
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.
override
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.
override
didChangePlatformBrightness() → void
Called when the platform brightness changes.
override
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
override
didHaveMemoryPressure() → void
Called when the system is running low on memory.
override
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.
override
didPushRoute(String route) Future<bool>
Called when the host tells the app to push a new route onto the navigator.
override
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).
override
dispose() → void
The framework calls this method when this StateMVC object will never build again.
override
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.
override
initState() → void
The framework will call this method exactly once. Only when the StateMVC object is first created.
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
onAsyncError(FlutterErrorDetails details) bool
Supply an 'error handler' routine if something goes wrong in the corresponding initAsync() routine.
override
onError(FlutterErrorDetails details) → void
Supply an 'error handler' routine to fire when an error occurs. Allows the user to define their own with each Controller.
reassemble() → void
During development, if a hot reload occurs, the reassemble method is called. This provides an opportunity to reinitialize any data that was prepared in the initState method.
override
refresh() → void
Allows the user to call setState() within the Controller.
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
Allows 'external' routines can call this function.
override
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 Methods

of<T extends StateMVC<StatefulWidget>>(BuildContext context) → T?
Supply the 'latest' StateMVC object from the widget tree.