$EzStateBase<T extends EzStatefulWidgetBase> class
abstract
This component should not be extended directly by application code. it is meant to be extended by classes generated by the ezFlap framework. As such, every ezFlap widget class implicitly extends it by extending the generated _EzStateBase class. This component and the generated _EzStateBase::
- render the widgets the application code has specified in ZML
- call hooks during certain points of the widget's lifecycle
- provide utilities, such as show an initial ZML while initializing and automatically switch to the primary ZML when done, allow to register callbacks to dispose of resources when the widget is disposed, and more.
Hooks are empty functions that are meant to be overridden by application code, as necessary. They begin with a "hook" prefix and so are easy to find and identify.
- Inheritance
- Implementers
- Annotations
Constructors
Properties
- $ezStateGuid ↔ int
-
getter/setter pair
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- hashCode → int
-
The hash code for this object.
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
-
The current configuration.
no setterinherited
Methods
-
$getModelHandler<
U> (String key, bool useDummyModelIfNotProvidedByHostWidget) → $ModelHandler< U> -
$getRouteParam<
U> (String key) → U -
$hasModelHandler(
String key) → bool -
$hasReachedReadyNowOrBefore(
) → bool - Should not be overridden or used by application code
-
$initDI(
[Map< String, dynamic> ? mapOverrides]) → void -
$instantiateOrMock(
String key, Function funcInstantiate) → EzStatefulWidgetBase -
$internalBuild(
BuildContext context) → Widget - Should not be overridden by application code
-
$internalInitState(
) → void - Should not be overridden or used by application code
-
$internalOnReady(
) → void - Should not be overridden or used by application code
-
$internalRefreshProps(
) → void - Should not be overridden or used by application code
-
$isReady(
) → bool - Should not be overridden or used by application code
-
$tryGetModelHandler<
U> (String key) → $ModelHandler< U> ? -
$tryGetRouteParam<
U> (String key, U defaultValue) → U -
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
build(
BuildContext context) → Widget -
Should not be overridden by application code
override
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(
covariant T oldWidget) → void -
Called whenever the widget configuration changes.
override
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
getInterpolatedText(
) → String - Full documentation: https://www.ezflap.io/advanced/interpolated-text/interpolated-text.html
-
hasEmitHandler(
String emitKey) → bool - Full documentation: https://www.ezflap.io/deep-dive/events/events.html
-
hookBuildInitialWidget(
) → Widget? - Called right after hookInitState, to give the application code a chance to provide an alternative Widget to render while the widget is being initialized.
-
hookDispose(
) → void - Called during State.dispose before the registered dispose callbacks (see onDispose) are invoked.
-
hookInitState(
) → void - Called during State.initState, after initializing all EzField with their default values.
-
hookPrepare(
) → Future< void> - Called shortly after hookInitState.
-
hookReady(
) → Future< void> - Called immediately after hookPrepare returns.
-
initState(
) → void -
Called when this object is inserted into the tree.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
VoidCallback func) → void - Call this function to register a callback to be called when disposing (i.e. when State.dispose is called).
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
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
-
tryGetInterpolatedText(
) → String? - Full documentation: https://www.ezflap.io/advanced/interpolated-text/interpolated-text.html
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
$autoMapper<
T> (dynamic dyn, T? func(dynamic value, dynamic key, dynamic keyOrIdx)) → List< T> - Should not be used by application code
-
$testAttr(
dynamic expected, dynamic actual) → bool - Should not be used by application code