watch<T> method

Stream<T> watch<T>(
  1. String key
)

Observe changes to a specific key, emitting the new value whenever it changes in any scope.

Implementation

Stream<T> watch<T>(String key) {
  return _changeController.stream
      .where((e) => e.key == key)
      .map((e) => e.newValue as T);
}