miguelpruivo/flutter_file_picker

Picking files while the keyboard is open doesn't work

Closed this issue · 2 comments

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug
A clear and concise description of what the bug is. If the issue happens to be on Android, please make sure that it also happens with a different device/simulator and/or version.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
Android 14

How are you picking?

await FilePicker.platform.pickFiles(
      type: FileType.custom,
      allowedExtensions: ['pdf', 'jpg'],
);

Details to reproduce the issue
When I try to select a file with the keyboard open, it won't work at all. I even trying unfocusing before actually picking the image, but the result is the same: it doesn't work.

Error Log
All I have is:

/FilePickerUtils( 5626): Allowed file extensions mimes: [application/pdf, image/jpeg]
D/FilePickerDelegate( 5626): Selected type */*
I/ImeTracker( 5626): com.example.example:3c64a84c: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT
W/WindowOnBackDispatcher( 5626): sendCancelIfRunning: isInProgress=falsecallback=ImeCallback=ImeOnBackInvokedCallback@231107865 Callback=android.window.IOnBackInvokedCallback$Stub$Proxy@a0fbd6
D/EGL_emulation( 5626): app_time_stats: avg=447.89ms min=1.73ms max=6375.06ms count=16
I/ImeTracker( 5626): com.example.example:bcc720ad: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT_BY_INSETS_API
I/ImeTracker( 5626): com.example.example:3c64a84c: onHidden
D/EGL_emulation( 5626): app_time_stats: avg=67.78ms min=5.29ms max=306.34ms count=15
I/FilePickerUtils( 5626): Caching from URI: content://com.android.providers.media.documents/document/image%3A1000000033
D/FilePickerUtils( 5626): File loaded and cached at:/data/user/0/com.example.example/cache/file_picker/1718315136778/Perfil.jpeg
D/FilePickerDelegate( 5626): File path:[com.mr.flutter.plugin.filepicker.FileInfo@8e1d0dc]
E/OpenGLRenderer( 5626): Unable to match the desired swap behavior.

Flutter Version details
image

Additional context
I tested while opening the keyboard inside a ModalBottomSheet, but I can't see if this works inside other type of Widgets.

This issue is stale because it has been open for 7 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.