Product class final

A product available for purchase in the app.

Products are registered with ProductCatalog and referenced throughout the billing module by their id.

final pro = Product(
  id: 'primekit_pro_monthly',
  title: 'Primekit Pro',
  description: 'Unlock all pro features',
  type: ProductType.subscription,
  pricing: PricingInfo(amount: 9.99, currency: 'USD', period: BillingPeriod.monthly),
  features: ['No ads', 'Unlimited exports', 'Priority support'],
  platformProductId: 'com.example.primekit.pro.monthly',
);

Constructors

Product({required String id, required String title, required String description, required ProductType type, required PricingInfo pricing, List<String> features = const [], String? platformProductId})
Creates a product definition.
const

Properties

description String
Localized description of what the product provides.
final
features List<String>
Human-readable list of features included in this product.
final
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier used throughout the Primekit billing system.
final
platformProductId String?
The App Store (Apple) or Play Store (Google) product SKU.
final
pricing PricingInfo
Price, currency, and billing-cycle information.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
Localized display name shown to the user.
final
type ProductType
Whether this is a consumable, non-consumable, or subscription product.
final

Methods

copyWith({String? id, String? title, String? description, ProductType? type, PricingInfo? pricing, List<String>? features, String? platformProductId}) Product
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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