Offering class
An offering is a collection of Package available for the user to purchase. For more info see https://docs.revenuecat.com/docs/entitlements
- Available extensions
- Annotations
-
- @freezed
Constructors
-
Offering(String identifier, String serverDescription, Map<
String, Object> metadata, List<Package> availablePackages, {Package? lifetime, Package? annual, Package? sixMonth, Package? threeMonth, Package? twoMonth, Package? monthly, Package? weekly}) -
constfactory
-
Offering.fromJson(Map<
String, dynamic> json) -
factory
Properties
- annual → Package?
-
Annual package type configured in the RevenueCat dashboard, if available.
no setterinherited
-
availablePackages
→ List<
Package> -
Array of Package objects available for purchase.
no setterinherited
-
copyWith
→ $OfferingCopyWith<
Offering> -
Create a copy of Offering
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
Unique identifier defined in RevenueCat dashboard.
no setterinherited
- lifetime → Package?
-
Lifetime package type configured in the RevenueCat dashboard, if available.
no setterinherited
-
metadata
→ Map<
String, Object> -
Offering metadata defined in RevenueCat dashboard.
no setterinherited
- monthly → Package?
-
Monthly package type configured in the RevenueCat dashboard, if available.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverDescription → String
-
Offering description defined in RevenueCat dashboard.
no setterinherited
- sixMonth → Package?
-
Six month package type configured in the RevenueCat dashboard, if available.
no setterinherited
- threeMonth → Package?
-
Three month package type configured in the RevenueCat dashboard, if available.
no setterinherited
- twoMonth → Package?
-
Two month package type configured in the RevenueCat dashboard, if available.
no setterinherited
- weekly → Package?
-
Weekly package type configured in the RevenueCat dashboard, if available.
no setterinherited
Methods
-
getMetadataString(
String key, String defaultValue) → String -
Available on Offering, provided by the OfferingX extension
Returns themetadata
value associated tokey
for the expected String type ordefaultValue
if not found, or it's not the expected String type. -
getPackage(
String identifier) → Package? - Retrieves a specific package by identifier, use this to access custom package types configured in the RevenueCat dashboard.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Offering to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited