Skip to content

Commit 15feb86

Browse files
committed
wip
1 parent 7a8dc2f commit 15feb86

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

lib/payment_service.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,4 +292,17 @@ class PaymentService {
292292
await FlutterInappPurchase.instance.requestPurchase(subsProps);
293293
}
294294
}
295+
296+
Future isEligibleForIntroOfferIOS() async {
297+
try {
298+
// We send the subscription group ID as documented. Unfortunately other
299+
// documentation says we need to use a subscription product ID instead so we may
300+
// still be unable to report an accurate free trial eligibility status to the
301+
// user.
302+
final isEligible = await FlutterInappPurchase.instance.isEligibleForIntroOfferIOS('21222841');
303+
return isEligible;
304+
} on Exception {
305+
return true;
306+
}
307+
}
295308
}

0 commit comments

Comments
 (0)