configure method

Future<void> configure({
  1. required String userId,
})

Initialize the Purchases SDK. Idempotent and concurrent-safe — a second call while the first is in flight awaits the same future. On failure the stored future is discarded so a later call (e.g. after sign-in retry) gets a fresh attempt instead of reusing the failed one.

Implementation

Future<void> configure({required String userId}) {
  final existing = _configureFuture;
  if (existing != null) return existing;
  final future = _doConfigure(userId);
  _configureFuture = future;
  return future;
}