cancelSubscription method
Cancels the subscription. The subscriber will stop receiving events
Implementation
Future<void> cancelSubscription(StreamSubscription? subscription) async {
_subscriptions.remove(subscription);
await subscription?.cancel();
}