onClose method

Future<void> onClose()

Cleans up notification subscriptions.

Call this method when disposing the bloc to prevent memory leaks.

Implementation

Future<void> onClose() async {
  await _foregroundNotificationSubscription?.cancel();
  await _notificationOpenSubscription?.cancel();
}