watch method

  1. @protected
CellWatcher watch(
  1. void fn()
)

Register a cell watch function fn.

See ValueCell.watch for more details.

The returned CellWatcher is automatically stopped when dispose is called.

Implementation

@protected
CellWatcher watch(void Function() fn) {
  final watch = ValueCell.watch(fn);
  _watchers.add(watch);

  return watch;
}