stopLocalServer function

Future<void> stopLocalServer()

Implementation

Future<void> stopLocalServer() async {
  if (_activeServer != null) {
    debugPrint('🛑 Stopping local server...');
    await _activeServer!.close(force: true);
    _activeServer = null;
  }
}