StateXController class
- Inheritance
-
- Object
- StateXController
- StateXController
- Mixed-in types
- Implementers
Constructors
-
StateXController([StateX<
StatefulWidget> ? state])
Properties
- dataObject ↔ Object?
-
This is of type Object allowing you
to propagate any class object you wish down the widget tree.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
A unique key is assigned to all State Controllers, State objects
Used in large projects to separate objects into teams.
no setterinherited
- inDebugMode → bool
-
Determines if running in an IDE or in production.
Returns true if the App is under in the Debugger and not production.
no setterinherited
- initialized → bool
-
Checks whether the controller has already been initialized.
no setterinherited
- isClosed → bool
-
Checks whether the controller has already been closed.
no setterinherited
- lastContext → BuildContext?
-
Returns the 'latest' context in the App.
no setterinherited
-
onDelete
→ InternalFinalCallback<
void> -
Internal callback that starts the cycle of this controller.
finalinherited
-
onStart
→ InternalFinalCallback<
void> -
Called at the exact moment the widget is allocated in memory.
It uses an internal "callable" type, to avoid any @overrides in subclases.
This method should be internal and is required to define the
lifetime cycle of the subclass.
finalinherited
-
rootState
→ AppStateX<
StatefulWidget> ? -
Returns the 'first' StateX object in the App
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ StateX<
StatefulWidget> ? -
The current StateX object.
no setterinherited
-
states
→ Set<
StateX< StatefulWidget> > -
Return a Set of State objects.
no setteroverride
Methods
-
$configureLifeCycle(
) → void -
inherited
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
addListener(
VoidCallback listener) → void -
override
-
addState(
StateX< StatefulWidget> ? state) → String -
Associate this StateXController to the specified State object
to use that State object's functions and features.
Returns that State object's unique identifier.
inherited
-
deactivate(
) → void -
The framework calls this method whenever it removes this
StateX
object from the tree.inherited -
dependOnInheritedWidget(
BuildContext? context) → bool -
Link a widget to a InheritedWidget
override
-
detachedLifecycleState(
) → void -
Either be in the progress of attaching when the engine is first initializing
or after the view being destroyed due to a Navigator pop.
inherited
-
didChangeAccessibilityFeatures(
) → void -
Called when the system changes the set of active accessibility features.
inherited
-
didChangeAppLifecycleState(
AppLifecycleState state) → void -
override
-
didChangeDependencies(
) → void -
Called when immediately after initState.
Otherwise called only if a dependency of an InheritedWidget.
inherited
-
didChangeLocales(
List< Locale> ? locales) → 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 -
Brightness changed.
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
-
didPop(
) → void -
Called when this route has been popped off.
inherited
-
didPopNext(
) → void -
The top route has been popped off, and this route shows up.
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
-
didPush(
) → void -
Called when this route has been pushed.
inherited
-
didPushNext(
) → void -
New route has been pushed, and this route is no longer visible.
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.
Exiting the application can proceed with
AppExitResponse.exit;
Cancel and do not exit the application with
AppExitResponse.cancel;
inherited
-
didUpdateWidget(
StatefulWidget oldWidget) → void -
Override this method to respond when the StatefulWidget is recreated.
inherited
-
dispose(
) → void -
The framework calls this method when this
StateX
object will never build again. Note: YOU WILL HAVE NO IDEA WHEN THIS WILL RUN in the Framework.inherited -
inactiveLifecycleState(
) → void -
The application is in an inactive state and is not receiving user input.
inherited
-
initAsync(
) → Future< bool> -
Used to complete asynchronous operations
inherited
-
initState(
) → void -
The framework will call this method exactly once.
Only when the
StateX
object is first created.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyClients(
) → void -
In harmony with Flutter's own API
Rebuild the InheritedWidget of the 'closes' InheritedStateX object if any.
inherited
-
ofState<
T extends StateX< (StatefulWidget> >) → T? -
Retrieve the StateX object by type
Returns null if not found
inherited
-
onAsyncError(
FlutterErrorDetails details) → void -
Supply an 'error handler' routine if something goes wrong
in the corresponding runAsync() routine.
inherited
-
onClose(
) → void -
Called before onDelete method. onClose might be used to
dispose resources used by the controller. Like closing events,
or streams before the controller is destroyed.
Or dispose objects that can potentially create some memory leaks,
like TextEditingControllers, AnimationControllers.
Might be useful as well to persist some data on disk.
inherited
-
onDetached(
) → void -
onInactive(
) → void -
onInit(
) → void -
Called immediately after the widget is allocated in memory.
You might use this to initialize something for the controller.
inherited
-
onPaused(
) → void -
onReady(
) → void -
Called 1 frame after onInit(). It is the perfect place to enter
navigation events, like snackbar, dialogs, or a new route, or
async request.
inherited
-
onResumed(
) → void -
pausedLifecycleState(
) → void -
The application is not currently visible to the user, not responding to
user input, and running in the background.
inherited
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
removeListener(
VoidCallback listener) → void -
override
-
resumedLifecycleState(
) → void -
The application is visible and responding to user input.
inherited
-
setRootStateX(
StateX< StatefulWidget> state) → void -
Important to record the 'root' StateX object. Its InheritedWidget!
inherited
-
setState(
VoidCallback fn) → void -
Provide the setState() function to external actors
inherited
-
stateOf<
T extends StatefulWidget> () → StateX< StatefulWidget> ? -
Retrieve the State object by its StatefulWidget. Returns null if not found.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateNewStateX(
covariant StateX< StatefulWidget> oldState) → void -
A State object may be unexpectedly re-created by a UniqueKey() in a parent for example.
You have to 'update' the properties of the new StateX object using the
old StateX object because it's going to be disposed of.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited