onDispose method

  1. @override
FutureOr onDispose()
override

Implementation

@override
FutureOr onDispose() {
  if (_foregroundNotificationSubscription != null) {
    _foregroundNotificationSubscription!.cancel();
    _foregroundNotificationSubscription = null;
  }

  if (_notificationOpenSubscription != null) {
    _notificationOpenSubscription!.cancel();
    _notificationOpenSubscription = null;
  }
}