addSubscription method

VoidCallback addSubscription(
  1. SubscriptionCallback builder
)

Implementation

VoidCallback addSubscription(SubscriptionCallback builder) {
  late VoidCallback cancel;
  _cancelCallbacks
      .add(cancel = builder(() => _cancelCallbacks.remove(cancel)));
  return cancel;
}