MutableComputeCell<T> class

A cell with a value computed by a user provided function which can also be set explicitly.

Inheritance
Implemented types
Available extensions

Constructors

MutableComputeCell({required T compute(), required void reverseCompute(T), required Set<ValueCell> arguments, bool changesOnly = false, dynamic key})
Create a MutableComputeCell with a given compute and reverse compute function.

Properties

arguments Set<ValueCell>
List of argument cells.
finalinherited
changesOnly bool
Should the cell notify its observers only when its value has changed?
finalinherited
equalityCellFactory EqualityCellFactory
Return a factory for creating equality and inequality comparison cells.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasState bool
Does this cell have a state?
no setterinherited
key ↔ dynamic
Key which uniquely identifies the cell
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → MutableComputedCellState<T, MutableDependentCell<T>>
The current state of the cell, or null if the cell is inactive.
no setterinherited
value ↔ T
The cell's value
getter/setter pairinherited

Methods

addObserver(CellObserver observer) → void
Register an observer of the cell to be called when the cell's value changes.
inherited
call() → T
Retrieve the value of the cell.
inherited
compute() → T
Compute the value of the cell.
override
createMutableState({covariant MutableComputedCellState<T, MutableDependentCell<T>>? oldState}) → MutableComputedCellState<T, MutableDependentCell<T>>
Create the state for the MutableCell.
inherited
createState() → MutableCellState<T, MutableCellBase<T>>
Create the CellState for this cell.
inherited
dumpState(CellValueCoder coder) Object?
Dump the state of the cell to a value.
inherited
eq<U>(ValueCell<U> other) ValueCell<bool>
Returns a new ValueCell which compares the value of this cell to another cell for equality.
inherited
neq<U>(ValueCell<U> other) ValueCell<bool>
Returns a new ValueCell which compares the value of this cell to another cell for inequality.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe() → void
Track this cell as an argument of the current compute/watch function.
inherited
removeObserver(CellObserver observer) → void
Remove an observer that was previously registered with addObserver.
inherited
restoreState(Object? state, CellValueCoder coder) → void
Restore the state of the cell.
inherited
reverseCompute(T value) → void
Set the value of the argument cells in response to the value of the cell being set.
override
toString() String
A string representation of this object.
inherited

Operators

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