close method

Future<void> close()

Closes all connections and cleans up resources

Implementation

Future<void> close() async {
  _logger.info('Closing VinculumClient');
  await _tokenSubscription?.cancel();
  await _realtime.disconnect();

  final storage = _tokenStorage;
  if (storage is InMemoryTokenStorage) {
    storage.dispose();
  }
}