setRestored method

dynamic setRestored(
  1. PurchaseDetails details
)

Implementation

setRestored(PurchaseDetails details) {
  log("Restoring Product =============> ${details.productID}");
  Map plan = {
    "ProductId": details.productID,
    "PurchaseId": details.purchaseID,
    "Status": details.status.name,
    "PurchaseDate": details.transactionDate,
  };
  subPref!.setBool(
    "subscription",
    true,
  );
  subPref!.setString(
    "plan",
    json.encode(plan),
  );
  Future.microtask(() {
    isSubscribed = true;
  });
}