cancelSubscription method

Future<void> cancelSubscription(
  1. StreamSubscription? subscription
)

Cancels events subscription.

Implementation

Future<void> cancelSubscription(StreamSubscription? subscription) async {
  await subscription?.cancel();
  _subscriptions.remove(subscription);
}