presentation/widgets/upgrade_prompt library

Classes

UpgradePrompt
Reusable paywall CTA that figures out the right destination based on the current user's plan, platform, and org membership.

Enums

UpgradeTarget
Where a paywalled user should be sent to resolve their limit.

Functions

resolveUpgradeTarget({required Entitlement entitlement, required List<Organization> orgs, required List<OrgMember>? orgMembers, required String? userId, String? scopedOrgId}) → ({String? adminRole, String? orgId, String? orgName, UpgradeTarget target})
Decision helper — pure function, easily unit-testable.