SignalTransaction class
Transaction - Batch multiple signal updates.
Transactions allow you to update multiple signals and only notify listeners once all updates are complete.
Basic Usage
final name = Signal<String>('Alice');
final age = Signal<int>(25);
SignalTransaction()
.update(name, 'Bob')
.update(age, 30)
.commit();
Constructors
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
-
commit(
) → void - Commit all updates atomically.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollback(
) → void - Rollback the transaction without applying changes.
-
toString(
) → String -
A string representation of this object.
inherited
-
update<
T> (Signal< T> signal, T value) → SignalTransaction - Add a signal update to the transaction.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited