toPurchaseModelWithOffer method
Converts this product to purchase model to pass to Qonversion.purchase.
offer
concrete Android offer which you'd like to purchase.
Returns purchase model to pass to the purchase method.
Implementation
QPurchaseModel toPurchaseModelWithOffer(QProductOfferDetails offer) {
final model = toPurchaseModel(offerId: offer.offerId);
// Remove offer for the case when provided offer details are for bare base plan.
if (offer.offerId == null) {
model.removeOffer();
}
return model;
}