Skip to content

Commit 02ffd94

Browse files
authored
[in_app_purchase] Prepare for NULLABLE_ARGUMENT_TO_NON_NULL_TYPE (flutter#3275)
[in_app_purchase] Prepare for `NULLABLE_ARGUMENT_TO_NON_NULL_TYPE`
1 parent bc6a553 commit 02ffd94

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.6+3
2+
3+
* Adds a null check, to prevent a new diagnostic.
4+
15
## 0.3.6+2
26

37
* Clarifies explanation of endorsement in README.
@@ -13,7 +17,7 @@
1317

1418
## 0.3.5+2
1519

16-
* Fix a crash when `appStoreReceiptURL` is nil.
20+
* Fixes a crash when `appStoreReceiptURL` is nil.
1721

1822
## 0.3.5+1
1923

packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: in_app_purchase_storekit
22
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
33
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 0.3.6+2
5+
version: 0.3.6+3
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"

packages/in_app_purchase/in_app_purchase_storekit/test/fakes/fake_storekit_platform.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ class FakeStoreKitPlatform {
163163
return Future<void>.sync(() {});
164164
case '-[InAppPurchasePlugin retrieveReceiptData:result:]':
165165
if (receiptData != null) {
166-
return Future<String>.value(receiptData);
166+
// TODO(asashour): Remove the `ignore` when Dart 3 reaches stable.
167+
// ignore: unnecessary_null_checks
168+
return Future<String>.value(receiptData!);
167169
} else {
168170
throw PlatformException(code: 'no_receipt_data');
169171
}

0 commit comments

Comments
 (0)