reset method

  1. @override
Future<void> reset()
inherited

Resets the plugin by removing all traces of it from the device.

Implementation

@override
Future<void> reset() async {
  for (final bloc in _webSocketBlocPool.values) {
    bloc.add(const ShutdownEvent());
  }

  await Future.wait(
    _webSocketBlocPool.values.map((bloc) => bloc.done.future),
  );

  await _hubEventController.close();
  await super.reset();
}