ValueCell<T> class abstract

Base value cell interface.

Implementers
Available extensions

Constructors

ValueCell()
const
ValueCell.computed(T compute(), {dynamic key, bool changesOnly = false})
Create a cell which computes its value using the function compute.
factory
ValueCell.value(T value)
Create a value cell with a constant value
const
factory

Properties

equalityCellFactory EqualityCellFactory
Return a factory for creating equality and inequality comparison cells.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The cell's value
no setter

Methods

addObserver(CellObserver observer) → void
Register an observer of the cell to be called when the cell's value changes.
call() → T
Retrieve the value of the cell.
eq<U>(ValueCell<U> other) ValueCell<bool>
Returns a new ValueCell which compares the value of this cell to another cell for equality.
neq<U>(ValueCell<U> other) ValueCell<bool>
Returns a new ValueCell which compares the value of this cell to another cell for inequality.
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.
removeObserver(CellObserver observer) → void
Remove an observer that was previously registered with addObserver.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

none([dynamic defaultValue]) → dynamic
Stop computation of the current cell's value.
watch(WatchCallback watch, {dynamic key}) CellWatcher
Register a callback function to be called whenever the values of the referenced cells change.