Closed aampor-12 closed 7 months ago
It works on my machine. Could you please share the code you're using?
Here's the one I used:
import 'package:filepicker_windows/filepicker_windows.dart';
void main() {
final file = OpenFilePicker()..title = 'Select a file';
final result = file.getFile();
if (result != null) {
print(result.path);
}
}
that's my code :
roby() { final file = OpenFilePicker()..title = 'select a file';
final result = file.getFile(); if (result != null) { return result.path; } }
Interesting, I have no idea why it doesn't work on your machine.
I found this on StackOverflow, which seems to be the same issue you're experiencing.
The answer got me thinking, can you clone this repository and add this line
options |= FILEOPENDIALOGOPTIONS.FOS_NODEREFERENCELINKS;
to open_file_picker.dart
and run the example?
Just published a new version that has a new field: dereferenceLinks
. By setting it to false
, you can now directly open the shortcut file without resolving its target if that's what you want.
when I chose a shortcut it says : catastrophic failure
can you fix it please
Thank you for the great Package,