-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Directory and File Picker #3
Conversation
Thanks for posting this PR, I will look at it soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! I reviewed the code and left some comments to work with.
I haven't tested yet because I cannot seem to find the flutter plugin that accompanies this host-side implementation. Can you please link the correct Flutter/Dart plugin to use with this?
return err | ||
} | ||
|
||
dialogProvider := dialogProvider{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The identifier shadows the type name.
@@ -10,6 +10,7 @@ Please report issues at the [go-flutter issue tracker](https://github.com/go-flu | |||
|
|||
- [shared_preferences](shared_preferences) - Provides a persistent store for simple data. ([flutter package](https://pub.dartlang.org/packages/shared_preferences)) | |||
- [path_provider](path_provider) - Finding commonly used locations on the filesystem. ([flutter package](https://pub.dartlang.org/packages/path_provider)) | |||
- [file_picker](file_picker) - Opens a dialog to pick file descriptors on the filesystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which Flutter plugin does this plugin link to?
Theres no underlying flutter plugin. I just used the library from this issue. This means it wouldn't be supported for mobile devices. |
Ahh, it would be great to have compatibility with the most-used plugin for Flutter. For example https://pub.dev/packages/file_picker |
- Renames title from dialog_picker to file_picker as it is the name of package - Corrects the go import statement to the correct one. - Removes the parameters on the FilePickerPlugin
- They aren't use by the plugin and are not mandatory to be set
How excatly would I link the mobile plugin with my desktop plugin? To use my plugin currently, I'm just calling Edit: I'm going to try just making it and see if it works like magic. |
@drdgvhbh Check out the dart side of the file_picker plugin: It shows you what method calls are being done. |
Ahh that makes sense. So the |
For now that makes more sense yes. I'd like to add plugins to this repository that mirror popular existing plugins. If there's no plugin to pick files yet, then perhaps that feature shouldn't be in this repository. You could ofcourse open an issue with the maintainer of the original file_picker, to see if adding directory selection may be interesting for them. |
I have added suggestion to file_picker plug-in |
It wouldn't be a bad idea to have it centralized in one place. Currently I've planned to add support for Desktop and Web for the Thank you. |
This could be a nice plugin on it's own. I think the plugins repository should mirror the "first class" plugins for flutter. (https://github.com/flutter/plugins/) I have recently added support for flutters I have added initial support for flutter's image_picker, it can still be extended further and help is welcome on that front as well. image_picker doesn't do everything you'd expect from a desktop file picker. So the plugin in this PR and what @chunhunghan is working in could still be very useful. I would like to suggest creating a separate repository for that. When that plugin becomes stable and also works as a dart plugin, it can be listed in the list.md file (which will later be integrated with hover tooling and perhaps a directory on hover.build to provide automatic compatibility listing) |
This adds a directory and file picker pluigin for desktop apps. Partially implements this issue go-flutter-desktop/go-flutter#64.
Tests for this plugin are provided and they include error cases. However, when I try to use the plugin intentionally providing an error case, it implodes. See go-flutter-desktop/go-flutter#132. Regular usage does work though.