Constructors
-
Purchase({required PurchaseRecordStore store, required PurchaseKind kind, required String item, PurchasePlan? plan, int? amount, required PurchaseState state, required bool renews, required bool test, required String startedAt, String? endsAt})
-
const
-
Purchase.fromJson(Map<String, Object?> json)
-
factory
Properties
-
amount
→ int?
-
final
-
endsAt
→ String?
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
item
→ String
-
Its name in the payments config: the upgrade’s claim, the unlock, or the credits.
final
-
kind
→ PurchaseKind
-
What was bought: the upgrade, an unlock, or a pack of credits.
final
-
plan
→ PurchasePlan?
-
final
-
renews
→ bool
-
A subscription that renews at endsAt.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
startedAt
→ String
-
RFC 3339 UTC timestamp with six fractional digits, e.g. 2026-08-17T09:30:00.000000Z
final
-
state
→ PurchaseState
-
active: grants what was bought. pending: awaiting payment. ended: ran out or was cancelled. refunded: paid back.
final
-
store
→ PurchaseRecordStore
-
Where the purchase was made: the App Store, Google Play, or drip’s pretend store in the preview (a test purchase; nothing was charged).
final
-
test
→ bool
-
Bought in a store’s test mode (Apple’s sandbox or TestFlight, a Google tester) or on the pretend store; no money moved.
final