Skip to content

Commit c4a4b4d

Browse files
Merge branch 'main' into feature/flutter-svg-error-builder
2 parents 766979e + 9b0ead5 commit c4a4b4d

File tree

8 files changed

+82
-17
lines changed

8 files changed

+82
-17
lines changed

packages/go_router/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## NEXT
1+
## 14.6.3
22

3-
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
3+
- Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
4+
- Updates readme.
45

56
## 14.6.2
67

packages/go_router/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,9 @@ The project follows the same priority system as flutter framework.
6969
[P3](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc+label%3Ateam-go_router+label%3AP3+)
7070

7171
[Package PRs](https://github.com/flutter/packages/pulls?q=is%3Apr+is%3Aopen+label%3A%22p%3A+go_router%22%2C%22p%3A+go_router_builder%22)
72+
73+
## Roadmap
74+
75+
This package has entered a maintenance phase. The Flutter team's primary focus will be on
76+
addressing bug fixes and ensuring stability. While active feature development is not currently
77+
planned, we welcome and encourage community contributions to expand the package's functionality.

packages/go_router/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: go_router
22
description: A declarative router for Flutter based on Navigation 2 supporting
33
deep linking, data-driven routes and more
4-
version: 14.6.2
4+
version: 14.6.3
55
repository: https://github.com/flutter/packages/tree/main/packages/go_router
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
77

packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.3.20+3
22

3+
* Fixes `finishTransaction` not completing.
34
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
45

56
## 0.3.20+2

packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/StoreKit2/InAppPurchasePlugin+StoreKit2.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ extension InAppPurchasePlugin: InAppPurchase2API {
139139
let transaction = try await fetchTransaction(by: UInt64(id))
140140
if let transaction = transaction {
141141
await transaction.finish()
142+
completion(.success(Void()))
142143
}
143144
}
144145
}

packages/in_app_purchase/in_app_purchase_storekit/example/lib/main.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ import 'consumable_store.dart';
1212
import 'example_payment_queue_delegate.dart';
1313

1414
void main() {
15+
InAppPurchaseStoreKitPlatform.enableStoreKit2();
1516
WidgetsFlutterBinding.ensureInitialized();
16-
1717
// When using the Android plugin directly it is mandatory to register
1818
// the plugin as default instance as part of initializing the app.
1919
InAppPurchaseStoreKitPlatform.registerPlatform();
20-
InAppPurchaseStoreKitPlatform.enableStoreKit2();
2120

2221
runApp(_MyApp());
2322
}

packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/InAppPurchaseStoreKit2PluginTests.swift

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,35 @@ final class InAppPurchase2PluginTests: XCTestCase {
6060
XCTAssertEqual(testProductMsg, fetchedProductMsg)
6161
}
6262

63+
func testGetTransactions() async throws {
64+
let purchaseExpectation = self.expectation(description: "Purchase should succeed")
65+
let transactionExpectation = self.expectation(
66+
description: "Getting transactions should succeed")
67+
68+
plugin.purchase(id: "consumable", options: nil) { result in
69+
switch result {
70+
case .success:
71+
purchaseExpectation.fulfill()
72+
case .failure(let error):
73+
XCTFail("Purchase should NOT fail. Failed with \(error)")
74+
}
75+
}
76+
77+
await fulfillment(of: [purchaseExpectation], timeout: 5)
78+
79+
plugin.transactions {
80+
result in
81+
switch result {
82+
case .success(let transactions):
83+
XCTAssert(transactions.count == 1)
84+
transactionExpectation.fulfill()
85+
case .failure(let error):
86+
XCTFail("Getting transactions should NOT fail. Failed with \(error)")
87+
}
88+
}
89+
await fulfillment(of: [transactionExpectation], timeout: 5)
90+
}
91+
6392
func testGetDiscountedProducts() async throws {
6493
let expectation = self.expectation(description: "products successfully fetched")
6594

@@ -91,7 +120,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
91120
case .success(let productMessages):
92121
fetchedProductMsg = productMessages
93122
expectation.fulfill()
94-
case .failure(_):
123+
case .failure:
95124
XCTFail("Products should be successfully fetched")
96125
}
97126
}
@@ -110,7 +139,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
110139

111140
plugin.products(identifiers: ["subscription_silver"]) { result in
112141
switch result {
113-
case .success(_):
142+
case .success:
114143
XCTFail("This `products` call should not succeed")
115144
case .failure(let error):
116145
expectation.fulfill()
@@ -127,7 +156,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
127156
let expectation = self.expectation(description: "Purchase request should succeed")
128157
plugin.purchase(id: "consumable", options: nil) { result in
129158
switch result {
130-
case .success(let purchaseResult):
159+
case .success:
131160
expectation.fulfill()
132161
case .failure(let error):
133162
XCTFail("Purchase should NOT fail. Failed with \(error)")
@@ -143,7 +172,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
143172
let expectation = self.expectation(description: "products request should fail")
144173
plugin.purchase(id: "consumable", options: nil) { result in
145174
switch result {
146-
case .success(_):
175+
case .success:
147176
XCTFail("Purchase should NOT suceed.")
148177
case .failure(let error):
149178
XCTAssertEqual(
@@ -162,7 +191,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
162191
let expectation = self.expectation(description: "Purchase request should succeed")
163192
plugin.purchase(id: "consumable", options: nil) { result in
164193
switch result {
165-
case .success(_):
194+
case .success:
166195
XCTFail("Purchase should NOT suceed.")
167196
case .failure(let error):
168197
XCTAssertEqual(error.localizedDescription, "Item Unavailable")
@@ -176,7 +205,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
176205
let expectation = self.expectation(description: "products request should fail")
177206
plugin.purchase(id: "invalid_product", options: nil) { result in
178207
switch result {
179-
case .success(_):
208+
case .success:
180209
XCTFail("Purchase should NOT suceed.")
181210
case .failure(let error):
182211
let pigeonError = error as! PigeonError
@@ -192,7 +221,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
192221
let expectation = self.expectation(description: "Purchase request should succeed")
193222
plugin.purchase(id: "subscription_discounted", options: nil) { result in
194223
switch result {
195-
case .success(let purchaseResult):
224+
case .success:
196225
expectation.fulfill()
197226
case .failure(let error):
198227
XCTFail("Purchase should NOT fail. Failed with \(error)")
@@ -205,7 +234,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
205234
let expectation = self.expectation(description: "Purchase request should succeed")
206235
plugin.purchase(id: "subscription_discounted", options: nil) { result in
207236
switch result {
208-
case .success(let purchaseResult):
237+
case .success:
209238
expectation.fulfill()
210239
case .failure(let error):
211240
XCTFail("Purchase should NOT fail. Failed with \(error)")
@@ -218,7 +247,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
218247
let expectation = self.expectation(description: "Purchase request should succeed")
219248
plugin.purchase(id: "consumable_discounted", options: nil) { result in
220249
switch result {
221-
case .success(let purchaseResult):
250+
case .success:
222251
expectation.fulfill()
223252
case .failure(let error):
224253
XCTFail("Purchase should NOT fail. Failed with \(error)")
@@ -233,7 +262,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
233262

234263
plugin.purchase(id: "subscription_silver", options: nil) { result in
235264
switch result {
236-
case .success(_):
265+
case .success:
237266
purchaseExpectation.fulfill()
238267
case .failure(let error):
239268
XCTFail("Purchase should NOT fail. Failed with \(error)")
@@ -250,4 +279,32 @@ final class InAppPurchase2PluginTests: XCTestCase {
250279

251280
await fulfillment(of: [restoreExpectation, purchaseExpectation], timeout: 5)
252281
}
282+
283+
func testFinishTransaction() async throws {
284+
let purchaseExpectation = self.expectation(description: "Purchase should succeed")
285+
let finishExpectation = self.expectation(description: "Finishing purchase should succeed")
286+
287+
plugin.purchase(id: "consumable", options: nil) { result in
288+
switch result {
289+
case .success(let purchase):
290+
purchaseExpectation.fulfill()
291+
case .failure(let error):
292+
XCTFail("Purchase should NOT fail. Failed with \(error)")
293+
}
294+
}
295+
296+
await fulfillment(of: [purchaseExpectation], timeout: 5)
297+
298+
// id should always be 0 as it is the first purchase
299+
plugin.finish(id: 0) { result in
300+
switch result {
301+
case .success():
302+
finishExpectation.fulfill()
303+
case .failure(let error):
304+
XCTFail("Finish purchases should NOT fail. Failed with \(error)")
305+
}
306+
}
307+
308+
await fulfillment(of: [finishExpectation], timeout: 5)
309+
}
253310
}

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.20+2
5+
version: 0.3.20+3
66

77
environment:
88
sdk: ^3.4.0

0 commit comments

Comments
 (0)