listen<T extends Listenable> method

  1. @override
T listen<T extends Listenable>(
  1. T source
)
override

Observes source during this widget's build and returns the same object.

Notifications rebuild this widget. Repeated reads share one subscription; sources no longer read by a subsequent build are detached. The source is borrowed and never disposed by the consumer. Event handlers use references captured during build instead of calling this method.

Implementation

@override
T listen<T extends Listenable>(T source) {
  _checkBuildReader('context.listen()');
  _listenForThisBuild(source);
  return source;
}