disconnect method

Future<Either<BaseException, void>> disconnect()

Implementation

Future<Either<BaseException, void>> disconnect() async {
  try {
    _stateSubscription?.cancel();
    await _controller?.stop();

    SeedKitLoggerService.i('Hub Disconnected');

    return const Right(null);
  } catch (e, s) {
    return ErrorHandler.fromError(e, stackTrace: s);
  }
}