ControllerMVC class

Your 'working' class most concerned with the app's functionality. Add it to a 'StateMVC' object to associate it with that State object.

Inheritance
Mixed in types
Implementers

Constructors

ControllerMVC([StateMVC<StatefulWidget>? state])

Properties

hashCode int
The hash code for this object.
no setterinherited
keyId String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state State<StatefulWidget>?
The current State object.
no setter
stateMVC StateMVC<StatefulWidget>?
The current StateMVC object.
no setter
states Set<StateMVC<StatefulWidget>>
Return a 'copy' of the Set of State objects.
no setterinherited

Methods

addState(StateMVC<StatefulWidget>? state) String
Associate this Controller to the specified State object to use that State object's functions and features. Returns that State object's unique identifier.
afterListener(String key) StateListener?
Retrieve the 'after' listener by its unique key.
beforeListener(String key) StateListener?
Retrieve the 'before' listener by its unique key.
deactivate() → void
The framework calls this method whenever it removes this StateMVC object from the tree.
inherited
didChangeAccessibilityFeatures() → void
Called when the system changes the set of 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 StateMVC object changes.
inherited
didChangeLocale(Locale locale) → void
Called when the system tells the app that the user's locale has changed.
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated.
inherited
didChangePlatformBrightness() → void
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
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.
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the app to push a new route onto the navigator.
inherited
didUpdateWidget(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. Note: THERE IS NO GUARANTEE THIS METHOD WILL RUN in the Framework.
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 framework will call this method exactly once. Only when the StateMVC object is first created.
inherited
listControllers(List<String> keys) List<ControllerMVC?>
Return a List of Controllers specified by key id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
For those accustom to the 'Provider' approach.
inherited
ofState<T extends State<StatefulWidget>>() → T?
Retrieve the State object by type Returns null if not found
inherited
onAsyncError(FlutterErrorDetails details) bool
Supply an 'error handler' routine if something goes wrong in the corresponding initAsync() routine. Returns true if the error was properly handled.
inherited
pushState(StateMVC<StatefulWidget>? state) bool
Push the StateMVC object to a Set of such objects Internal use only: This connects the Controller to this View!
inherited
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
rebuild() → void
Allow for a more accurate description
inherited
refresh() → void
Allows external classes to 'refresh' or 'rebuild' the widget tree.
inherited
removeState(StateMVC<StatefulWidget>? state) bool
Remove the specified StateMVC object to a Set of such objects Internal use only: This disconnects the Controller to this View!
inherited
setState(VoidCallback fn) → void
Provide the setState() function to external actors
inherited
toString() String
A string representation of this object.
inherited

Operators

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