ModifiableAsync<C extends Cell> class
Provides asynchronous execution of operations on a Cell.
This wrapper enables:
- Thread-safe operation execution via Dart's
Futuremechanism - Non-blocking cell interactions
- Integration with async/await patterns
When to use
You get this from cell.async. Use it when you need to execute commands
asynchronously – e.g., from UI event handlers or background tasks.
How it works
It wraps the synchronous apply method in a Future. If the cell has a
lock, the operation is synchronised to prevent race conditions.
Example Usage:
final cell = Cell();
final async = cell.async;
final result = await async.apply((x) => x + 1, [5]);
Type Parameters
C: The specific type of Cell being wrapped.
- Implemented types
- Implementers
Constructors
- ModifiableAsync(C cell)
-
Creates an asynchronous wrapper for the given
cell.const
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
-
apply(
Function function, {List? positionalArguments, Map< Symbol, dynamic> ? namedArguments, ApplyTransactionScope? tx, Function? compensate, List? compensatePositional, Map<Symbol, dynamic> ? compensateNamed, Cell? compensateCell}) → Future - Asynchronously applies a function to the wrapped cell.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited