addListener method

  1. @override
Disposer addListener(
  1. GetStateUpdate listener
)
inherited

Register a closure to be called when the object notifies its listeners.

Implementation

@override
Disposer addListener(GetStateUpdate listener) {
  assert(_debugAssertNotDisposed());
  _updaters!.add(listener);
  return () => _updaters!.remove(listener);
}