shutdown method

  1. @override
Future<void> shutdown()
override

Shutdown all services

Implementation

@override
Future<void> shutdown() async {
  if (!_initialized) return;

  _logger.fine('Shutting down web platform');

  try {
    // Stop background service if running
    if (_backgroundService != null) {
      await _backgroundService!.stop();
      _backgroundService = null;
    }

    // Clean up notification handlers if any
    if (_notificationManager != null) {
      _notificationManager = null;
    }

    _initialized = false;
    _logger.info('Web platform shutdown complete');
  } catch (e, stackTrace) {
    _logger.severe('Error during web platform shutdown', e, stackTrace);
    // Still mark as not initialized
    _initialized = false;
  }
}