stopHotReload method

Future<void> stopHotReload()

Stops file watching and closes the VM service connection.

Implementation

Future<void> stopHotReload() async {
  _stopRequested = true;
  await _initialization;
  _entrypointDebounce?.cancel();
  _entrypointDebounce = null;
  await _entrypointSubscription?.cancel();
  _entrypointSubscription = null;
  final reloader = _reloader;
  _reloader = null;
  await reloader?.stop();
}