GeneratedAirState class abstract

Base class for generated state classes INNOV-010: Code Generation Support

Extend this in your generated code:

abstract class _CounterState extends GeneratedAirState {
  _CounterState() : super('counter');
  // Generated pulse handlers...
}
Inheritance
Available extensions

Constructors

GeneratedAirState(String _generatedModuleId)

Properties

hashCode int
The hash code for this object.
no setterinherited
moduleId String?
Get the module ID
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Dispose all subscriptions
inherited
flow<T>(String key, T value, {String? sourceModuleId}) → void
Flow a new value into an Air state with optional tracking
inherited
getFlow<T>(AirStateKey<T> key) → T
Helper to get typed state
inject<T>() → T

Available on AirState, provided by the AirDIControllerExtension extension

Inject a dependency from the DI container
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<T>(AirPulse<T> signal, void handler(T data, {void onError(String error)?, VoidCallback? onSuccess})) → void
Register a handler for a strictly typed AirSignal
inherited
onInit() → void
Initialize state and data before listening to signals
inherited
onPulses() → void
Override to register pulse handlers
override
onRaw<T>(String action, void callback(T data, {void onError(String error)?, VoidCallback? onSuccess})) → void
Internal listener using raw signal name
inherited
onRawSignal(String signalName, void callback(dynamic data)) → void
Conveniently listen to a signal (dynamic)
inherited
pulse<T>(AirPulse<T> signal, T params, {VoidCallback? onSuccess, void onError(String)?}) → void
Emit a signal with this module's context
inherited
pulseRaw({required String action, dynamic params, VoidCallback? onSuccess, void onError(String)?}) → void
Emit a raw signal with this module's context
inherited
setFlow<T>(AirStateKey<T> key, T value) → void
Helper to set typed state
toString() String
A string representation of this object.
inherited
typedFlow<T>(AirStateKey<T> stateKey, T value) → void

Available on AirState, provided by the TypedAirStateBase extension

Flows a value using a typed key (convenience method).
updateFlow<T>(AirStateKey<T> key, T updater(T current)) → void
Helper to update typed state with a function

Operators

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