addListener method

StreamSubscription<T> addListener(
  1. OnUpdate<T> onUpdate
)

Creates, stores and returns a listener.

Implementation

StreamSubscription<T> addListener(OnUpdate<T> onUpdate) {
  _subscriptions.add(
    _updateNotifier.stream.asBroadcastStream().listen(onUpdate),
  );

  return _subscriptions.last;
}