Skip to content

Commit 808d790

Browse files
[various] Update Pigeon in Swift plugins (flutter#4461)
Updates `pigeon` in all of our Swift plugins, to ensure that they have the fix for flutter#129283 Fixes flutter#129536
1 parent d70eed0 commit 808d790

File tree

19 files changed

+86
-66
lines changed

19 files changed

+86
-66
lines changed

packages/file_selector/file_selector_macos/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.3+1
2+
3+
* Updates to the latest version of `pigeon`.
4+
15
## 0.9.3
26

37
* Adds `getSaveLocation` and deprecates `getSavePath`.

packages/file_selector/file_selector_macos/lib/src/messages.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
77

packages/file_selector/file_selector_macos/macos/Classes/messages.g.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
import Foundation
@@ -35,7 +35,7 @@ private func wrapError(_ error: Any) -> [Any?] {
3535

3636
private func nilOrValue<T>(_ value: Any?) -> T? {
3737
if value is NSNull { return nil }
38-
return (value as Any) as! T?
38+
return value as! T?
3939
}
4040

4141
/// A Pigeon representation of the macOS portion of an `XTypeGroup`.
@@ -46,7 +46,7 @@ struct AllowedTypes {
4646
var mimeTypes: [String?]
4747
var utis: [String?]
4848

49-
static func fromList(_ list: [Any]) -> AllowedTypes? {
49+
static func fromList(_ list: [Any?]) -> AllowedTypes? {
5050
let extensions = list[0] as! [String?]
5151
let mimeTypes = list[1] as! [String?]
5252
let utis = list[2] as! [String?]
@@ -78,9 +78,9 @@ struct SavePanelOptions {
7878
var nameFieldStringValue: String? = nil
7979
var prompt: String? = nil
8080

81-
static func fromList(_ list: [Any]) -> SavePanelOptions? {
81+
static func fromList(_ list: [Any?]) -> SavePanelOptions? {
8282
var allowedFileTypes: AllowedTypes? = nil
83-
if let allowedFileTypesList = list[0] as! [Any]? {
83+
if let allowedFileTypesList: [Any?] = nilOrValue(list[0]) {
8484
allowedFileTypes = AllowedTypes.fromList(allowedFileTypesList)
8585
}
8686
let directoryPath: String? = nilOrValue(list[1])
@@ -115,11 +115,11 @@ struct OpenPanelOptions {
115115
var canChooseFiles: Bool
116116
var baseOptions: SavePanelOptions
117117

118-
static func fromList(_ list: [Any]) -> OpenPanelOptions? {
118+
static func fromList(_ list: [Any?]) -> OpenPanelOptions? {
119119
let allowsMultipleSelection = list[0] as! Bool
120120
let canChooseDirectories = list[1] as! Bool
121121
let canChooseFiles = list[2] as! Bool
122-
let baseOptions = SavePanelOptions.fromList(list[3] as! [Any])!
122+
let baseOptions = SavePanelOptions.fromList(list[3] as! [Any?])!
123123

124124
return OpenPanelOptions(
125125
allowsMultipleSelection: allowsMultipleSelection,
@@ -142,11 +142,11 @@ private class FileSelectorApiCodecReader: FlutterStandardReader {
142142
override func readValue(ofType type: UInt8) -> Any? {
143143
switch type {
144144
case 128:
145-
return AllowedTypes.fromList(self.readValue() as! [Any])
145+
return AllowedTypes.fromList(self.readValue() as! [Any?])
146146
case 129:
147-
return OpenPanelOptions.fromList(self.readValue() as! [Any])
147+
return OpenPanelOptions.fromList(self.readValue() as! [Any?])
148148
case 130:
149-
return SavePanelOptions.fromList(self.readValue() as! [Any])
149+
return SavePanelOptions.fromList(self.readValue() as! [Any?])
150150
default:
151151
return super.readValue(ofType: type)
152152
}
@@ -214,7 +214,7 @@ class FileSelectorApiSetup {
214214
codec: codec)
215215
if let api = api {
216216
displayOpenPanelChannel.setMessageHandler { message, reply in
217-
let args = message as! [Any]
217+
let args = message as! [Any?]
218218
let optionsArg = args[0] as! OpenPanelOptions
219219
api.displayOpenPanel(options: optionsArg) { result in
220220
switch result {
@@ -236,7 +236,7 @@ class FileSelectorApiSetup {
236236
codec: codec)
237237
if let api = api {
238238
displaySavePanelChannel.setMessageHandler { message, reply in
239-
let args = message as! [Any]
239+
let args = message as! [Any?]
240240
let optionsArg = args[0] as! SavePanelOptions
241241
api.displaySavePanel(options: optionsArg) { result in
242242
switch result {

packages/file_selector/file_selector_macos/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: file_selector_macos
22
description: macOS implementation of the file_selector plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_macos
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
5-
version: 0.9.3
5+
version: 0.9.3+1
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"
@@ -27,4 +27,4 @@ dev_dependencies:
2727
flutter_test:
2828
sdk: flutter
2929
mockito: 5.4.1
30-
pigeon: ^9.2.4
30+
pigeon: ^10.1.3

packages/file_selector/file_selector_macos/test/messages_test.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
77
// ignore_for_file: avoid_relative_lib_imports

packages/path_provider/path_provider_foundation/CHANGELOG.md

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

3+
* Updates to the latest version of `pigeon`.
34
* Updates minimum supported macOS version to 10.14.
45

56
## 2.2.3

packages/path_provider/path_provider_foundation/darwin/Classes/messages.g.swift

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
import Foundation
8+
89
#if os(iOS)
9-
import Flutter
10+
import Flutter
1011
#elseif os(macOS)
11-
import FlutterMacOS
12+
import FlutterMacOS
1213
#else
13-
#error("Unsupported platform.")
14+
#error("Unsupported platform.")
1415
#endif
1516

1617
private func wrapResult(_ result: Any?) -> [Any?] {
@@ -22,19 +23,19 @@ private func wrapError(_ error: Any) -> [Any?] {
2223
return [
2324
flutterError.code,
2425
flutterError.message,
25-
flutterError.details
26+
flutterError.details,
2627
]
2728
}
2829
return [
2930
"\(error)",
3031
"\(type(of: error))",
31-
"Stacktrace: \(Thread.callStackSymbols)"
32+
"Stacktrace: \(Thread.callStackSymbols)",
3233
]
3334
}
3435

3536
private func nilOrValue<T>(_ value: Any?) -> T? {
3637
if value is NSNull { return nil }
37-
return (value as Any) as! T?
38+
return value as! T?
3839
}
3940

4041
enum DirectoryType: Int {
@@ -55,10 +56,11 @@ class PathProviderApiSetup {
5556
/// The codec used by PathProviderApi.
5657
/// Sets up an instance of `PathProviderApi` to handle messages through the `binaryMessenger`.
5758
static func setUp(binaryMessenger: FlutterBinaryMessenger, api: PathProviderApi?) {
58-
let getDirectoryPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger)
59+
let getDirectoryPathChannel = FlutterBasicMessageChannel(
60+
name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger)
5961
if let api = api {
6062
getDirectoryPathChannel.setMessageHandler { message, reply in
61-
let args = message as! [Any]
63+
let args = message as! [Any?]
6264
let typeArg = DirectoryType(rawValue: args[0] as! Int)!
6365
do {
6466
let result = try api.getDirectoryPath(type: typeArg)
@@ -70,10 +72,11 @@ class PathProviderApiSetup {
7072
} else {
7173
getDirectoryPathChannel.setMessageHandler(nil)
7274
}
73-
let getContainerPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger)
75+
let getContainerPathChannel = FlutterBasicMessageChannel(
76+
name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger)
7477
if let api = api {
7578
getContainerPathChannel.setMessageHandler { message, reply in
76-
let args = message as! [Any]
79+
let args = message as! [Any?]
7780
let appGroupIdentifierArg = args[0] as! String
7881
do {
7982
let result = try api.getContainerPath(appGroupIdentifier: appGroupIdentifierArg)

packages/path_provider/path_provider_foundation/lib/messages.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
77

packages/path_provider/path_provider_foundation/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: path_provider_foundation
22
description: iOS and macOS implementation of the path_provider plugin
33
repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
5-
version: 2.2.3
5+
version: 2.2.4
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"
@@ -32,4 +32,4 @@ dev_dependencies:
3232
sdk: flutter
3333
mockito: 5.4.1
3434
path: ^1.8.0
35-
pigeon: ^9.2.4
35+
pigeon: ^10.1.3

packages/path_provider/path_provider_foundation/test/messages_test.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
4+
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
77
// ignore_for_file: avoid_relative_lib_imports

0 commit comments

Comments
 (0)