I have promo codes that I created on google play for my user. With this code, the user can use 3 months free of charge. When the user logs in on another device, I can't get the information that the user is in the trial period. Therefore, the purchase screen appears again. how can i solve this. I understand from the code below that the user is a premium member.
Future updatePurchaseStatus() async {
final purchaserInfo = await Purchases.getCustomerInfo();
final entitlements = purchaserInfo.entitlements.active.values.toList();
_entitlement =
entitlements.isEmpty ? Entitlement.free : Entitlement.premium;
if (entitlements.isNotEmpty) {
_entitlementInfo = purchaserInfo.entitlements.active.values.last;
}
notifyListeners();
}