runWithClientNonRetryable<R> method

Future<R> runWithClientNonRetryable<R>(
  1. Future<R> action(
    1. BillingClient client
    )
)

Executes the given action with access to the underlying BillingClient.

If necessary, waits for the underlying BillingClient to connect. Designed only for operations that do not return a subclass of HasBillingResponse (e.g. BillingClient.isReady, BillingClient.isFeatureSupported).

See runWithClient for operations that return a subclass of HasBillingResponse.

Implementation

Future<R> runWithClientNonRetryable<R>(
  Future<R> Function(BillingClient client) action,
) async {
  _debugAssertNotDisposed();
  await _readyFuture;
  return action(client);
}