store method

StoreCell<T> store({
  1. bool changesOnly = false,
})

Return a ValueCell which stores the value of this cell in memory.

This is useful for cells which compute their value on demand but do not store it.

The returned StoreCell stores the value of this cell in memory whenever it changes. Further references to the returned cell's value retrieve the stored value rather than running the computation function again.

If changesOnly is true, the returned cell only notifies its observers if its value has actually changed.

Implementation

StoreCell<T> store({
  bool changesOnly = false
}) => StoreCell(this,
    changesOnly: changesOnly
);