We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
problem: FilePickerResult always return null code:FilePickerResult? result = await FilePicker.platform.pickFiles( allowMultiple: true ); version:file_picker: ^8.1.6
FilePickerResult? result = await FilePicker.platform.pickFiles( allowMultiple: true );
console log :[ ] I/FilePickerDelegate(24128): User cancelled the picker request
but file_picker: 8.1.4 is ok
env: flutter doctor -v [✓] Flutter (Channel stable, 3.27.1, on macOS 15.2 24C101 darwin-arm64, locale en-US) • Flutter version 3.27.1 on channel stable at /Users/abc/install/dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 17025dd882 (2 days ago), 2024-12-17 03:23:09 +0900 • Engine revision cb4b5fff73 • Dart version 3.6.0 • DevTools version 2.40.2
The text was updated successfully, but these errors were encountered:
looking at the difference in code it looks like a permission error, i am not sure but it may lead you to a fix 4083ae4
since the checks for permission got removed
Sorry, something went wrong.
according:4083ae4
[android] problem:file_picker: ^8.1.6 1.only support video and images ,others return null demo code: ` PermissionStatus status = await Permission.photos.request(); LogE("PermissionStatus.photos:${status.isGranted}"); // true status = await Permission.videos.request(); LogE("PermissionStatus.videos:${status.isGranted}"); // true status = await Permission.audio.request(); LogE("PermissionStatus.audio:${status.isGranted}"); // true status = await Permission.manageExternalStorage.request(); LogE("PermissionStatus.manageExternalStorage:${status.isGranted}"); // true
FilePickerResult? result = await FilePicker.platform.pickFiles( allowCompression: false, allowMultiple: true, type: FileType.video,// FileType.image, FileType.audio );
2.[allowedExtensions] 2.1.works well code: type: FileType.custom, allowedExtensions: ['jpg', 'png', 'mp4', 'mov'], 2.2.return null type: FileType.custom,// FileType.any allowedExtensions: ['pdf','docx'], ` 2.3.console log:return null [ ] I/FilePickerDelegate(20648): User cancelled the picker request
2.[allowedExtensions] 2.1.works well code:
2.2.return null
3.file_picker: ^8.1.4
always works well
No branches or pull requests
problem: FilePickerResult always return null
code:
FilePickerResult? result = await FilePicker.platform.pickFiles( allowMultiple: true );
version:file_picker: ^8.1.6
console log :[ ] I/FilePickerDelegate(24128): User cancelled the picker request
but
file_picker: 8.1.4 is ok
env:
flutter doctor -v
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.2 24C101 darwin-arm64, locale en-US)
• Flutter version 3.27.1 on channel stable at /Users/abc/install/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17025dd882 (2 days ago), 2024-12-17 03:23:09 +0900
• Engine revision cb4b5fff73
• Dart version 3.6.0
• DevTools version 2.40.2
The text was updated successfully, but these errors were encountered: