supabaseClient property

SupabaseClient get supabaseClient

Implementation

SupabaseClient get supabaseClient {
  final currentState = state;
  if (currentState._supabaseClient != null) {
    return currentState._supabaseClient!;
  }
  if (currentState.createSupabaseClient == null) {
    throw Exception('No client found');
  }
  assert(currentState.createSupabaseClient != null &&
      currentState._supabaseClient == null);
  final res = currentState.createSupabaseClient!.call();
  emit(currentState.copyWith(supabaseClient: res));
  return res;
}