resume method

Future<void> resume()

Resumes the client (typically when the mobile app returns to foreground).

Reopens the WebSocket connection and resubscribes all active queries.

Implementation

Future<void> resume() async {
  if (!_isPaused || _disposed) return;
  final inFlight = _pauseFuture;
  if (inFlight != null) {
    await inFlight;
  }
  if (_disposed) return;
  _isPaused = false;
  _reconnectAttemptCount = 0;
  _shouldResubscribeAfterReconnect = true;
  _reconnectTimer?.cancel();
  _reconnectTimer = null;
  await _attemptReconnect();
}