flutter_file_picker
flutter_file_picker copied to clipboard
Can you change the way it runs on macOS?
In summary, use Channel like iOS.
Please use beginSheetModal instead of runModal. (runModal works the same as the way uses osascript you were written.)
guard let keywindow = NSApplication.shared.keyWindow else {
result(nil)
return
}
NSOpenPanel().beginSheetModal(for: keywindow) { response in
}
It appears more beautiful appearance, and to solve the issue.
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
runModal works the same as the way uses osascript you were written.
This isn't actually correct; an in-process runModal
call would already be vastly better than osascript
. The latter is not intended for use in GUI applications, and shows the dialog in a completely separate process, which creates significant issues around focus and window management.
Any updates on this? It would be really nice if the the lockParentWindow
would actually work on macOS.
Docs for runModal
: https://developer.apple.com/documentation/appkit/nsapplication/1428436-runmodal
I imagine this would also fix https://github.com/miguelpruivo/flutter_file_picker/issues/1445
Closing this issue as a duplicate of https://github.com/miguelpruivo/flutter_file_picker/issues/1492 since that issue has a better explanation of what needs to change.