addListener method Null safety

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

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);
}