-
Notifications
You must be signed in to change notification settings - Fork 711
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
Reimplement file picker on macOS with method channels #1690
Reimplement file picker on macOS with method channels #1690
Conversation
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.
Overall this looks great! Just some minor feedback around deprecations & docs.
Co-authored-by: Navaron Bracke <[email protected]>
@orestesgaolin We can add SPM support for MacOS/iOS as a follow-up PR. |
I will check if this fixes #1685 with symbolic links. |
@orestesgaolin For #1105 we could add a new method, that allows picking both files and directories? But we also need to pay attention to the feedback in #1469 |
Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]> Update lib/src/file_picker.dart Co-authored-by: Navaron Bracke <[email protected]>
6c7e5db
to
90c4513
Compare
c405fd1
to
ec43673
Compare
@navaronbracke I applied all suggestions and responded to comments, marked them as resolved -- hope you don't mind. Feel free to unresolve any pending issues or questions. |
Btw I can bump the version and update the changelog here too, should I bump it to 8.2.0 or 8.1.8? |
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.
LGTM. Can you update the version to 8.2.0 and update the changelog? Then this can be released when the PR is merged :)
I still need to check if this handles symlinks, so I'll probably do that before we merge this. |
The analysis failure is unrelated to this PR. I'll look into that as well. |
Version 8.2.0 is fine.
The analysis reports 3 switch cases where the
|
@orestesgaolin I was wrong about the minimum MacOS version. When I run the example app with your branch, I get
So the minimum should be |
@orestesgaolin This does seem to fix the symlink bug! I did the following to test:
Edit: Updated the OP to reflect this. |
Updated min version and proposed a changelog. Also tweaked list items in few recent releases to look nicer ;) |
@orestesgaolin Did you manage to look into the analysis failures on the Dart side? (i.e. You can remove the following These prevent the updated tests to run in CI. I can do this later, but in case you want to address this still. |
@orestesgaolin I went ahead and put out a patch for the lint fixes (on my corp account, but hey) |
Sorry, was doing some of my corp stuff too ;) you were quicker! |
No worries! I'll get it sorted real quick! |
Tree is green! I'll check in with pub in a moment. Thanks! |
@navaronbracke @orestesgaolin thank you for your amazing work! I can't wait to ship with the new package |
This should be available on Pub now. |
🕺 |
This PR:
FilePicker.platform.getDirectoryPath()
returns on MacOS path containing symbolic links #1685It is still somewhat prone to #1680 - if the picked file contains
/
then it's replaced by:
I was wondering if I should address #1582 but figured it would be better to migrate both iOS and macOS later. I'll try if I find some time.
Now we can also address #1105 but that would require public API change.
Can someone confirm if this addresses #1685?
Here's a demo of this plugin on macOS 15.1.1 (24B91)
file-picker-demo.mp4
Feel free to add the note below to https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup