From 31560567c1dfbb7d4c7a16fabb7efcda7eeae188 Mon Sep 17 00:00:00 2001 From: Christian Alfoni Date: Sat, 21 Mar 2020 07:16:01 +0100 Subject: [PATCH] Set defaults for finishing transaction When testing on Android BETA we got the message: "Boolean expression must not be null". I spent ages figuring this out, so thought it would be good to have some sensible defaults here so others avoid this message :-) --- lib/flutter_inapp_purchase.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flutter_inapp_purchase.dart b/lib/flutter_inapp_purchase.dart index c089d9bd..018cb0ff 100644 --- a/lib/flutter_inapp_purchase.dart +++ b/lib/flutter_inapp_purchase.dart @@ -423,7 +423,7 @@ class FlutterInappPurchase { /// /// Call this after finalizing server-side validation of the reciept. Future finishTransaction(PurchasedItem purchasedItem, - { String developerPayloadAndroid, bool isConsumable }) async { + { String developerPayloadAndroid = '', bool isConsumable = false }) async { if (_platform.isAndroid) { if (isConsumable) { String result = await _channel.invokeMethod('consumeProduct', {