ObserverCellState<S extends StatefulCell> mixin

Implements the CellObserver interface for cells of which the value depends on other cells.

This cell provides an implementation of CellObserver.willUpdate and CellObserver.update which keep track of whether the cells value should be recomputed.

Classes which make use of this mixin, should check the stale property. If stale is true, the cell's value should be recomputed.

Superclass constraints
Implemented types

Properties

cell → S
The cell associated with this state
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isActive bool
Does this cell have at least one observer?
no setterinherited
isDisposed bool
Has this state been disposed.
no setterinherited
key → dynamic
The key identifying the cell.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldNotifyAlways bool
Should the observer be notified if the new value of the cell is equal to the previous value?
no setterinherited
stale bool
Should the cell's value be recomputed
getter/setter pair
updating bool
Is a cell value update currently in progress
getter/setter pair

Methods

addObserver(CellObserver observer) → void
Add an observer which is notified of changes in the value of the cell.
inherited
didChange() bool
Check whether the cell's value has changed.
dispose() → void
Teardown the cell state.
inherited
init() → void
Initialize the cell state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyUpdate({bool isEqual = false, bool didChange = true}) → void
Notify the observers of the cell that the cell's value has changed.
inherited
notifyWillUpdate({bool isEqual = false}) → void
Notify the observers of the cell that the cell's value will change.
inherited
onUpdate(bool didChange) → void
Called when update is called
onWillUpdate() → void
Called when willUpdate is called for the first time during an update cycle.
postUpdate() → void
Called after the value of the cell has been updated.
preUpdate() → void
Called when this observer is first notified that the values of the observed cells will change.
removeObserver(CellObserver observer) → void
Remove an observer, so that it is no longer notified of changes in the value of the cell.
inherited
toString() String
A string representation of this object.
inherited
update(ValueCell cell, bool didChange) → void
The observed cell has changed its value.
override
willUpdate(ValueCell cell) → void
The observed cell will change its value.
override

Operators

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