UserOfferData class

The server-resolved offer payload for a single user.

Mirrors UserOffer.OfferData on Android. Contains eligibility, the target checkout product, display copy, and optional proration / Apple subscription details.

Constructors

UserOfferData({required UserOfferActionType actionType, required bool isEligible, String? checkoutProductId, String? fromProductId, required int savingsPercent, required int freeTrialDays, required int minSubscriptionDays, int? maxSubscriptionDays, required int rolloutPercent, UserOfferDisplay? display, UserOfferProration? proration, required bool requiresAppleCancel, UserOfferAppleSubscription? appleSubscription, String? checkoutPresentation, String? experimentVariantId, UserOfferSourceStorefront? source})
const
UserOfferData.fromMap(Map<String, dynamic> m)
factory

Properties

actionType UserOfferActionType
The action the SDK should take for this user.
final
appleSubscription UserOfferAppleSubscription?
Current Apple subscription state. null for non-StoreKit users.
final
checkoutPresentation String?
Checkout presentation style override (e.g. "sheet", "inline"). null means use the global SDK default.
final
checkoutProductId String?
Product ID to open in the checkout sheet when the CTA is tapped. null when actionType is UserOfferActionType.noAction.
final
display UserOfferDisplay?
Server-configurable display copy. null means use SDK defaults.
final
experimentVariantId String?
A/B experiment variant ID echoed back for analytics. null when no experiment is active.
final
freeTrialDays int
Free-trial days granted by this offer on the new web subscription.
final
fromProductId String?
The user's current product ID being migrated away from (upgrade/migrate flows).
final
hashCode int
The hash code for this object.
no setterinherited
isEligible bool
Whether the user is currently eligible to receive the offer.
final
maxSubscriptionDays int?
Maximum subscription tenure (days) above which the offer is suppressed. null means no upper bound.
final
minSubscriptionDays int
Minimum subscription tenure (days) the user must have to be eligible.
final
proration UserOfferProration?
Proration details for upgrade flows. null for migration flows.
final
requiresAppleCancel bool
Whether the SDK must prompt the user to cancel their Apple subscription after checkout completes.
final
rolloutPercent int
Percentage of eligible users who should receive the offer (A/B rollout).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savingsPercent int
Percentage savings displayed in the offer tip.
final
source UserOfferSourceStorefront?
The storefront from which the user's active subscription originates. null for web-originated subscriptions or when there is no active sub.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited