dispose method

Future<void> dispose()

Disposes of the service and cleans up resources.

Implementation

Future<void> dispose() async {
  await _foregroundSubscription?.cancel();
  await _openedAppSubscription?.cancel();
  await _badgeCountController.close();
  _foregroundSubscription = null;
  _openedAppSubscription = null;
  _initialized = false;
  logi('NotificationService disposed');
}