mirror of
https://github.com/flutter/packages.git
synced 2025-06-29 22:33:11 +08:00
[various] Update Pigeon in Swift plugins (#4461)
Updates `pigeon` in all of our Swift plugins, to ensure that they have the fix for https://github.com/flutter/flutter/issues/129283 Fixes https://github.com/flutter/flutter/issues/129536
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
## 0.9.3+1
|
||||
|
||||
* Updates to the latest version of `pigeon`.
|
||||
|
||||
## 0.9.3
|
||||
|
||||
* Adds `getSaveLocation` and deprecates `getSavePath`.
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// 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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
import Foundation
|
||||
@ -35,7 +35,7 @@ private func wrapError(_ error: Any) -> [Any?] {
|
||||
|
||||
private func nilOrValue<T>(_ value: Any?) -> T? {
|
||||
if value is NSNull { return nil }
|
||||
return (value as Any) as! T?
|
||||
return value as! T?
|
||||
}
|
||||
|
||||
/// A Pigeon representation of the macOS portion of an `XTypeGroup`.
|
||||
@ -46,7 +46,7 @@ struct AllowedTypes {
|
||||
var mimeTypes: [String?]
|
||||
var utis: [String?]
|
||||
|
||||
static func fromList(_ list: [Any]) -> AllowedTypes? {
|
||||
static func fromList(_ list: [Any?]) -> AllowedTypes? {
|
||||
let extensions = list[0] as! [String?]
|
||||
let mimeTypes = list[1] as! [String?]
|
||||
let utis = list[2] as! [String?]
|
||||
@ -78,9 +78,9 @@ struct SavePanelOptions {
|
||||
var nameFieldStringValue: String? = nil
|
||||
var prompt: String? = nil
|
||||
|
||||
static func fromList(_ list: [Any]) -> SavePanelOptions? {
|
||||
static func fromList(_ list: [Any?]) -> SavePanelOptions? {
|
||||
var allowedFileTypes: AllowedTypes? = nil
|
||||
if let allowedFileTypesList = list[0] as! [Any]? {
|
||||
if let allowedFileTypesList: [Any?] = nilOrValue(list[0]) {
|
||||
allowedFileTypes = AllowedTypes.fromList(allowedFileTypesList)
|
||||
}
|
||||
let directoryPath: String? = nilOrValue(list[1])
|
||||
@ -115,11 +115,11 @@ struct OpenPanelOptions {
|
||||
var canChooseFiles: Bool
|
||||
var baseOptions: SavePanelOptions
|
||||
|
||||
static func fromList(_ list: [Any]) -> OpenPanelOptions? {
|
||||
static func fromList(_ list: [Any?]) -> OpenPanelOptions? {
|
||||
let allowsMultipleSelection = list[0] as! Bool
|
||||
let canChooseDirectories = list[1] as! Bool
|
||||
let canChooseFiles = list[2] as! Bool
|
||||
let baseOptions = SavePanelOptions.fromList(list[3] as! [Any])!
|
||||
let baseOptions = SavePanelOptions.fromList(list[3] as! [Any?])!
|
||||
|
||||
return OpenPanelOptions(
|
||||
allowsMultipleSelection: allowsMultipleSelection,
|
||||
@ -142,11 +142,11 @@ private class FileSelectorApiCodecReader: FlutterStandardReader {
|
||||
override func readValue(ofType type: UInt8) -> Any? {
|
||||
switch type {
|
||||
case 128:
|
||||
return AllowedTypes.fromList(self.readValue() as! [Any])
|
||||
return AllowedTypes.fromList(self.readValue() as! [Any?])
|
||||
case 129:
|
||||
return OpenPanelOptions.fromList(self.readValue() as! [Any])
|
||||
return OpenPanelOptions.fromList(self.readValue() as! [Any?])
|
||||
case 130:
|
||||
return SavePanelOptions.fromList(self.readValue() as! [Any])
|
||||
return SavePanelOptions.fromList(self.readValue() as! [Any?])
|
||||
default:
|
||||
return super.readValue(ofType: type)
|
||||
}
|
||||
@ -214,7 +214,7 @@ class FileSelectorApiSetup {
|
||||
codec: codec)
|
||||
if let api = api {
|
||||
displayOpenPanelChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let optionsArg = args[0] as! OpenPanelOptions
|
||||
api.displayOpenPanel(options: optionsArg) { result in
|
||||
switch result {
|
||||
@ -236,7 +236,7 @@ class FileSelectorApiSetup {
|
||||
codec: codec)
|
||||
if let api = api {
|
||||
displaySavePanelChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let optionsArg = args[0] as! SavePanelOptions
|
||||
api.displaySavePanel(options: optionsArg) { result in
|
||||
switch result {
|
||||
|
@ -2,7 +2,7 @@ name: file_selector_macos
|
||||
description: macOS implementation of the file_selector plugin.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_macos
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
|
||||
version: 0.9.3
|
||||
version: 0.9.3+1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
@ -27,4 +27,4 @@ dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
mockito: 5.4.1
|
||||
pigeon: ^9.2.4
|
||||
pigeon: ^10.1.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
|
||||
// ignore_for_file: avoid_relative_lib_imports
|
||||
|
@ -1,5 +1,6 @@
|
||||
## NEXT
|
||||
## 2.2.4
|
||||
|
||||
* Updates to the latest version of `pigeon`.
|
||||
* Updates minimum supported macOS version to 10.14.
|
||||
|
||||
## 2.2.3
|
||||
|
@ -1,16 +1,17 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(iOS)
|
||||
import Flutter
|
||||
import Flutter
|
||||
#elseif os(macOS)
|
||||
import FlutterMacOS
|
||||
import FlutterMacOS
|
||||
#else
|
||||
#error("Unsupported platform.")
|
||||
#error("Unsupported platform.")
|
||||
#endif
|
||||
|
||||
private func wrapResult(_ result: Any?) -> [Any?] {
|
||||
@ -22,19 +23,19 @@ private func wrapError(_ error: Any) -> [Any?] {
|
||||
return [
|
||||
flutterError.code,
|
||||
flutterError.message,
|
||||
flutterError.details
|
||||
flutterError.details,
|
||||
]
|
||||
}
|
||||
return [
|
||||
"\(error)",
|
||||
"\(type(of: error))",
|
||||
"Stacktrace: \(Thread.callStackSymbols)"
|
||||
"Stacktrace: \(Thread.callStackSymbols)",
|
||||
]
|
||||
}
|
||||
|
||||
private func nilOrValue<T>(_ value: Any?) -> T? {
|
||||
if value is NSNull { return nil }
|
||||
return (value as Any) as! T?
|
||||
return value as! T?
|
||||
}
|
||||
|
||||
enum DirectoryType: Int {
|
||||
@ -55,10 +56,11 @@ class PathProviderApiSetup {
|
||||
/// The codec used by PathProviderApi.
|
||||
/// Sets up an instance of `PathProviderApi` to handle messages through the `binaryMessenger`.
|
||||
static func setUp(binaryMessenger: FlutterBinaryMessenger, api: PathProviderApi?) {
|
||||
let getDirectoryPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger)
|
||||
let getDirectoryPathChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
getDirectoryPathChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let typeArg = DirectoryType(rawValue: args[0] as! Int)!
|
||||
do {
|
||||
let result = try api.getDirectoryPath(type: typeArg)
|
||||
@ -70,10 +72,11 @@ class PathProviderApiSetup {
|
||||
} else {
|
||||
getDirectoryPathChannel.setMessageHandler(nil)
|
||||
}
|
||||
let getContainerPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger)
|
||||
let getContainerPathChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
getContainerPathChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let appGroupIdentifierArg = args[0] as! String
|
||||
do {
|
||||
let result = try api.getContainerPath(appGroupIdentifier: appGroupIdentifierArg)
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// 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
|
||||
|
||||
|
@ -2,7 +2,7 @@ name: path_provider_foundation
|
||||
description: iOS and macOS implementation of the path_provider plugin
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
|
||||
version: 2.2.3
|
||||
version: 2.2.4
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
@ -32,4 +32,4 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
mockito: 5.4.1
|
||||
path: ^1.8.0
|
||||
pigeon: ^9.2.4
|
||||
pigeon: ^10.1.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
|
||||
// ignore_for_file: avoid_relative_lib_imports
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 2.3.2
|
||||
|
||||
* Updates to the latest version of `pigeon`.
|
||||
|
||||
## 2.3.1
|
||||
|
||||
* Fixes variable binding bug on older versions of Xcode.
|
||||
|
@ -1,16 +1,17 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.5), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(iOS)
|
||||
import Flutter
|
||||
import Flutter
|
||||
#elseif os(macOS)
|
||||
import FlutterMacOS
|
||||
import FlutterMacOS
|
||||
#else
|
||||
#error("Unsupported platform.")
|
||||
#error("Unsupported platform.")
|
||||
#endif
|
||||
|
||||
private func wrapResult(_ result: Any?) -> [Any?] {
|
||||
@ -22,19 +23,19 @@ private func wrapError(_ error: Any) -> [Any?] {
|
||||
return [
|
||||
flutterError.code,
|
||||
flutterError.message,
|
||||
flutterError.details
|
||||
flutterError.details,
|
||||
]
|
||||
}
|
||||
return [
|
||||
"\(error)",
|
||||
"\(type(of: error))",
|
||||
"Stacktrace: \(Thread.callStackSymbols)"
|
||||
"Stacktrace: \(Thread.callStackSymbols)",
|
||||
]
|
||||
}
|
||||
|
||||
private func nilOrValue<T>(_ value: Any?) -> T? {
|
||||
if value is NSNull { return nil }
|
||||
return (value as Any) as! T?
|
||||
return value as! T?
|
||||
}
|
||||
/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
|
||||
protocol UserDefaultsApi {
|
||||
@ -51,10 +52,11 @@ class UserDefaultsApiSetup {
|
||||
/// The codec used by UserDefaultsApi.
|
||||
/// Sets up an instance of `UserDefaultsApi` to handle messages through the `binaryMessenger`.
|
||||
static func setUp(binaryMessenger: FlutterBinaryMessenger, api: UserDefaultsApi?) {
|
||||
let removeChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.remove", binaryMessenger: binaryMessenger)
|
||||
let removeChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.remove", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
removeChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let keyArg = args[0] as! String
|
||||
do {
|
||||
try api.remove(key: keyArg)
|
||||
@ -66,10 +68,11 @@ class UserDefaultsApiSetup {
|
||||
} else {
|
||||
removeChannel.setMessageHandler(nil)
|
||||
}
|
||||
let setBoolChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setBool", binaryMessenger: binaryMessenger)
|
||||
let setBoolChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.setBool", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
setBoolChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let keyArg = args[0] as! String
|
||||
let valueArg = args[1] as! Bool
|
||||
do {
|
||||
@ -82,10 +85,11 @@ class UserDefaultsApiSetup {
|
||||
} else {
|
||||
setBoolChannel.setMessageHandler(nil)
|
||||
}
|
||||
let setDoubleChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setDouble", binaryMessenger: binaryMessenger)
|
||||
let setDoubleChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.setDouble", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
setDoubleChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let keyArg = args[0] as! String
|
||||
let valueArg = args[1] as! Double
|
||||
do {
|
||||
@ -98,12 +102,13 @@ class UserDefaultsApiSetup {
|
||||
} else {
|
||||
setDoubleChannel.setMessageHandler(nil)
|
||||
}
|
||||
let setValueChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setValue", binaryMessenger: binaryMessenger)
|
||||
let setValueChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.setValue", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
setValueChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let keyArg = args[0] as! String
|
||||
let valueArg = args[1]
|
||||
let valueArg = args[1]!
|
||||
do {
|
||||
try api.setValue(key: keyArg, value: valueArg)
|
||||
reply(wrapResult(nil))
|
||||
@ -114,10 +119,11 @@ class UserDefaultsApiSetup {
|
||||
} else {
|
||||
setValueChannel.setMessageHandler(nil)
|
||||
}
|
||||
let getAllChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.getAll", binaryMessenger: binaryMessenger)
|
||||
let getAllChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.getAll", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
getAllChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let prefixArg = args[0] as! String
|
||||
let allowListArg: [String]? = nilOrValue(args[1])
|
||||
do {
|
||||
@ -130,10 +136,11 @@ class UserDefaultsApiSetup {
|
||||
} else {
|
||||
getAllChannel.setMessageHandler(nil)
|
||||
}
|
||||
let clearChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.clear", binaryMessenger: binaryMessenger)
|
||||
let clearChannel = FlutterBasicMessageChannel(
|
||||
name: "dev.flutter.pigeon.UserDefaultsApi.clear", binaryMessenger: binaryMessenger)
|
||||
if let api = api {
|
||||
clearChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let prefixArg = args[0] as! String
|
||||
let allowListArg: [String]? = nilOrValue(args[1])
|
||||
do {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.5), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// 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
|
||||
|
||||
|
@ -2,7 +2,7 @@ name: shared_preferences_foundation
|
||||
description: iOS and macOS implementation of the shared_preferences plugin.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_foundation
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
|
||||
version: 2.3.1
|
||||
version: 2.3.2
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
@ -29,4 +29,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
pigeon: ^9.2.4
|
||||
pigeon: ^10.1.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.5), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
|
||||
// ignore_for_file: avoid_relative_lib_imports
|
||||
|
@ -1,5 +1,6 @@
|
||||
## NEXT
|
||||
## 3.0.6
|
||||
|
||||
* Updates to the latest version of `pigeon`.
|
||||
* Updates minimum supported macOS version to 10.14.
|
||||
* Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// 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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
// Autogenerated from Pigeon (v9.2.4), do not edit directly.
|
||||
// Autogenerated from Pigeon (v10.1.3), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
import Foundation
|
||||
@ -35,7 +35,7 @@ private func wrapError(_ error: Any) -> [Any?] {
|
||||
|
||||
private func nilOrValue<T>(_ value: Any?) -> T? {
|
||||
if value is NSNull { return nil }
|
||||
return (value as Any) as! T?
|
||||
return value as! T?
|
||||
}
|
||||
|
||||
/// Possible error conditions for [UrlLauncherApi] calls.
|
||||
@ -51,7 +51,7 @@ struct UrlLauncherBoolResult {
|
||||
var value: Bool
|
||||
var error: UrlLauncherError? = nil
|
||||
|
||||
static func fromList(_ list: [Any]) -> UrlLauncherBoolResult? {
|
||||
static func fromList(_ list: [Any?]) -> UrlLauncherBoolResult? {
|
||||
let value = list[0] as! Bool
|
||||
var error: UrlLauncherError? = nil
|
||||
let errorEnumVal: Int? = nilOrValue(list[1])
|
||||
@ -75,7 +75,7 @@ private class UrlLauncherApiCodecReader: FlutterStandardReader {
|
||||
override func readValue(ofType type: UInt8) -> Any? {
|
||||
switch type {
|
||||
case 128:
|
||||
return UrlLauncherBoolResult.fromList(self.readValue() as! [Any])
|
||||
return UrlLauncherBoolResult.fromList(self.readValue() as! [Any?])
|
||||
default:
|
||||
return super.readValue(ofType: type)
|
||||
}
|
||||
@ -127,7 +127,7 @@ class UrlLauncherApiSetup {
|
||||
codec: codec)
|
||||
if let api = api {
|
||||
canLaunchUrlChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let urlArg = args[0] as! String
|
||||
do {
|
||||
let result = try api.canLaunch(url: urlArg)
|
||||
@ -145,7 +145,7 @@ class UrlLauncherApiSetup {
|
||||
codec: codec)
|
||||
if let api = api {
|
||||
launchUrlChannel.setMessageHandler { message, reply in
|
||||
let args = message as! [Any]
|
||||
let args = message as! [Any?]
|
||||
let urlArg = args[0] as! String
|
||||
do {
|
||||
let result = try api.launch(url: urlArg)
|
||||
|
@ -2,7 +2,7 @@ name: url_launcher_macos
|
||||
description: macOS implementation of the url_launcher plugin.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_macos
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
|
||||
version: 3.0.5
|
||||
version: 3.0.6
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
@ -25,5 +25,5 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
pigeon: ^9.2.4
|
||||
pigeon: ^10.1.3
|
||||
test: ^1.16.3
|
||||
|
Reference in New Issue
Block a user