I am using adapty_flutter_ui to show the paywall. I am making a one-time purchase for a product whose ID I want to bind so that if the user comes across the same product, I can identify that the purchase has already been made using myProductId. Since I am using adapty_flutter_ui, I don't have control over how the purchase was made.
Future<bool> buyMyOneTimeProduct(String locale, String myProductId) async {
await _setMetadataInProfile();
final paywall = await sdk.getPaywall(placementId: 'Property');
final view = await ui.createPaywallView(paywall: paywall, locale: locale);
await view.present();
// How do I bind success purchase to my myProductId ??
}
I can listen to the adapty.didProfileUpdate() stream, but then I don't know which purchase is related to myProductId.
I am using
adapty_flutter_ui
to show the paywall. I am making a one-time purchase for a product whose ID I want to bind so that if the user comes across the same product, I can identify that the purchase has already been made usingmyProductId
. Since I am usingadapty_flutter_ui
, I don't have control over how the purchase was made.I can listen to the
adapty.didProfileUpdate()
stream, but then I don't know which purchase is related tomyProductId
.