presentation/providers/entitlement_providers library
Classes
- OrgEntitlement
-
Flattened view of the
org_entitlements()JSONB return value. - OrgEntitlementsFamily
- Per-organization entitlements — what does THIS org's plan unlock, regardless of which orgs the caller also belongs to.
- OrgEntitlementsProvider
- Per-organization entitlements — what does THIS org's plan unlock, regardless of which orgs the caller also belongs to.
Mixins
Constants
- orgEntitlementsProvider → const OrgEntitlementsFamily
- Per-organization entitlements — what does THIS org's plan unlock, regardless of which orgs the caller also belongs to.
Properties
-
currentEntitlementsProvider
→ FutureProvider<
Entitlement> -
The current user's entitlements. Loaded on first access and cached until
invalidated (on sign-in/out, purchase completion, or admin grant change).
final
-
entitlementDatasourceProvider
→ Provider<
EntitlementDatasource> -
Singleton datasource wrapping the Supabase client.
final
-
entitlementInvalidationWatcherProvider
→ FutureProvider<
void> -
Background watcher that subscribes to Supabase Realtime on the
admin_grantsandsubscriptionstables and invalidates the cached currentEntitlementsProvider on any change. RLS still filters which rows the client receives — only grants/subs targeting the current user (or their org, as an admin) will trigger an event.final
Functions
-
currentEntitlements(
Ref< Object?> ref) → Future<Entitlement> - The current user's entitlements. Loaded on first access and cached until invalidated (on sign-in/out, purchase completion, or admin grant change).
-
entitlementDatasource(
Ref< Object?> ref) → EntitlementDatasource - Singleton datasource wrapping the Supabase client.
-
entitlementInvalidationWatcher(
Ref< Object?> ref) → Future<void> -
Background watcher that subscribes to Supabase Realtime on the
admin_grantsandsubscriptionstables and invalidates the cached currentEntitlementsProvider on any change. RLS still filters which rows the client receives — only grants/subs targeting the current user (or their org, as an admin) will trigger an event. -
orgEntitlements(
Ref< Object?> ref, String orgId) → Future<OrgEntitlement> - Per-organization entitlements — what does THIS org's plan unlock, regardless of which orgs the caller also belongs to.