I get a platform exception trying to use this in a flutter app deployed to MacOS, but it works on android and iOS. Are there any plans to extend support to native mac / desktop?
Thanks!
This plugin already has Desktop support through Flutter Go. You may want to take a look.
As Flutter Desktop itself is on a really early stage, I don鈥檛 have plans for it right now and it鈥檚 a low priority feature. However, support for Flutter Web is being added in the next days.
Thanks!
Good news is I added support to file_picker_web (check the web-support branch) using Flutter's team approach for multiple platform support. This actually opens the possibility to easily add support to MacOS Desktop as well, so this actually may be a feature in a near future.
@miguelpruivo Could you provide some hints, what would be necessary to add support for macOS? The NeoSEALs team is happy to provide a respective PR 馃殌
nothing helpful, just reminder that it does not work with macos
flutter: [FilePicker] Unsupported operation. Method not found. The exception thrown was: MissingPluginException(No implementation found for method any on channel miguelruivo.flutter.plugins.filepicker)
[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method any on channel miguelruivo.flutter.plugins.filepicker)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
<asynchronous suspension>
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
#2 FilePicker._getPath (package:file_picker/file_picker.dart:85:39)
#3 FilePicker.getFile (package:file_picker/file_picker.dart:50:15)
#4 importJson (package:schema_studio/utils/importer/import_json.dart:6:32)
#5 initMenubars.<anonymous closure> (package:schema_studio/utils/menubar.dart:14:17)
#6 MenuChannel._callbackHandler (package:menubar/src/menu_channel.dart:279:40)
#7 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430:55)
#8 MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:383:33)
#9 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:258:33)
#10 _invoke3.<anonymous closure> (dart:ui/hooks.dart:296:15)
#11 _rootRun (dart:async/zone.dart:1190:13)
#12 _CustomZone.run (dart:async/zone.dart:1093:19)
#13 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#14 _invoke3 (dart:ui/hooks.dart:295:10)
#15 _dispatchPlatformMessage (dart:ui/hooks.dart:170:5)
Hi guys, it's pretty clear at this moment that this plugin doesn't support MacOS (only through Flutter go). Otherwise I'd have added it on supported features.
This might come in a feature, but for the time being, there are other priorities in the line.
Thank you!
Support for MacOS should now be an easy go since file_picker 2.0.0, because all platforms are now merged.
Looking forward it as soon as I have time, but feel free to issue a PR if you have any chance.
Support for MacOS should now be an easy go since file_picker 2.0.0, because all platforms are now merged.
Looking forward it as soon as I have time, but feel free to issue a PR if you have any chance.
I'm testing now, but getting MissingPluginException
Do I need do something more to work on mac desktop?
@Katekko it's not yet implemented.
For now, you can use Go implementation, which is supported by MacOS (and all other desktop platforms).
@Katekko it's not yet implemented.
For now, you can use Go implementation, which is supported by MacOS (and all other desktop platforms).
I sorry.
So I just need follow the instructions on readme?
@Katekko yes, just follow this but you'll need to use file_picker: 1.13.3 as of now until #382 is resolved.
I have tested a sample application for selecting files in Flutter Windows desktop. Only "Select folder" function works (including a couple of fixes)
Flutter support for desktop has matured a lot since may, are there any plans to support desktop OSs natively by now?
@vware might be a possibility yes. However currently I don鈥檛 have a windows machine so it won鈥檛 be easy to test it out on all three.
thanks for the quick reply. just in case people look for a google-ish interim solution, there is a plugin that's part of the flutter desktop embedding effort:
file_chooser:
git:
url: git://github.com/google/flutter-desktop-embedding.git
path: plugins/file_chooser
ref: INSERT_HASH_HERE
Just adding my support for this feature. I would love to help but have no idea how flutter plugins work. Is there anyway I can help?
Was this supposed to be fixed by https://github.com/miguelpruivo/flutter_file_picker/issues/382 or is that something else?
Try this on M1 based MacOS, it works, just got null path.
FilePickerResult result = await FilePicker.platform.pickFiles();
if (result != null) {
//File file = File(result.files.single.path);
print(result.files.map((e) => e.path).toString());
print(result.files.single.name);
} else {
// User canceled the picker
}
This feature would be very useful, I had to remove this package from my project and use filepicker_windows or file_picker_cross analyzing which, Flutter go limited me a lot.
Most helpful comment
Support for MacOS should now be an easy go since file_picker 2.0.0, because all platforms are now merged.
Looking forward it as soon as I have time, but feel free to issue a PR if you have any chance.