read<T> method

T read<T>(
  1. Watchable<T> watchable
)

Reads the current state of the watchable.

Cannot be called while building a widget.

Implementation

T read<T>(Watchable<T> watchable) {
  assert(!debugDoingBuild, 'Cannot call read() while building a widget.');
  return readScope().read(watchable, null);
}