supabaseDatasource function Providers

  1. @Riverpod(keepAlive: true)
SupabaseDatasource supabaseDatasource(
  1. Ref<Object?> ref
)

Root SupabaseDatasource singleton. Every screen/provider that reads Supabase data watches this provider — it's the one-and-only instance wired to Supabase.instance.client. Kept alive for the app lifetime.

Implementation

@Riverpod(keepAlive: true)
SupabaseDatasource supabaseDatasource(Ref ref) {
  return SupabaseDatasource(Supabase.instance.client);
}