LogicBlockBinding<TState extends StateLogic<TState>> class abstract interface

A binding to a logic block.

Bindings allow you to register callbacks for specific input types, state types, output types, and error types. Using bindings enables more declarative code and prevents unnecessary updates when a state has changed but the relevant data within it has not.

Always dispose your binding when you are finished with it.

Implemented types
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cleanup() → void
Called during dispose to release any resources held by the listener.
inherited
dispose() → void
Disposes the listener, invoking cleanup if not already disposed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError<TError>(ErrorCallback<TError> handler) → void
Registers a handler to be invoked whenever an error of type TError is encountered.
onInput<TInput extends Object>(InputCallback<TInput> handler) → void
Registers a handler to be invoked whenever an input of type TInput is received.
onOutput<TOutput extends Object>(OutputCallback<TOutput> handler) → void
Registers a handler to be invoked whenever an output of type TOutput is produced.
onState<TStateType extends TState>(StateCallback<TState> handler) → void
Registers a handler to be invoked whenever a state of type TStateType is encountered.
receiveError(Object error) → void
Called whenever the logic block encounters an error.
inherited
receiveInput<TInput extends Object>(TInput input) → void
Called whenever the logic block receives an input of type TInput.
inherited
receiveOutput<TOutput extends Object>(TOutput output) → void
Called whenever the logic block produces an output of type TOutput.
inherited
receiveState(TState state) → void
Called whenever the logic block transitions to a new state.
inherited
toString() String
A string representation of this object.
inherited

Operators

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