getEligibleWinBackOffersForProduct static method
iOS only, requires iOS 18.0 or greater with StoreKit 2.
Use this function to retrieve the eligible WinBackOffers that a subscriber is eligible for for a given StoreProduct.
product The StoreProduct the user intends to purchase.
Implementation
static Future<List<WinBackOffer>> getEligibleWinBackOffersForProduct(
StoreProduct product,
) async {
final result =
await _channel.invokeMethod('eligibleWinBackOffersForProduct', {
'productIdentifier': product.identifier,
});
return (result as List)
.map((e) => WinBackOffer.fromJson(Map<String, dynamic>.from(e)))
.toList();
}