Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Link in comments
  • Loading branch information
stuartmorgan-g committed May 1, 2023
commit 0bb97da3d08114440eb71b1273f444028f993cab
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class FileSelectorPlugin: NSObject, FlutterPlugin, FileSelectorApi {
if #available(macOS 11, *), !forceLegacyTypes {
var allowedTypes: [UTType] = []
// The array values are non-null by convention even though Pigeon can't currently express
// that via the types; see messages.dart.
// that via the types; see messages.dart and https://github.com/flutter/flutter/issues/97848
allowedTypes.append(contentsOf: acceptedTypes.utis.compactMap({ UTType($0!) }))
allowedTypes.append(
contentsOf: acceptedTypes.extensions.flatMap({
Expand All @@ -118,7 +118,7 @@ public class FileSelectorPlugin: NSObject, FlutterPlugin, FileSelectorApi {
} else {
var allowedTypes: [String] = []
// The array values are non-null by convention even though Pigeon can't currently express
// that via the types; see messages.dart.
// that via the types; see messages.dart and https://github.com/flutter/flutter/issues/97848
allowedTypes.append(contentsOf: acceptedTypes.extensions.map({ $0! }))
allowedTypes.append(contentsOf: acceptedTypes.utis.map({ $0! }))
if !allowedTypes.isEmpty {
Expand Down