diff --git a/lib/flutter_inapp_purchase.dart b/lib/flutter_inapp_purchase.dart index 49a31785..2374ee05 100644 --- a/lib/flutter_inapp_purchase.dart +++ b/lib/flutter_inapp_purchase.dart @@ -542,7 +542,11 @@ class FlutterInappPurchase { }) async { if (_platform.isIOS) { var history = - await (getPurchaseHistory() as FutureOr>); + await (getPurchaseHistory() as Future?>); + + if (history == null) { + return false; + } for (var purchase in history) { Duration difference =