i have built a flutter social media app and use the plugin "file_picker" to pick an image from the gallery as the profile image:
FilePickerResult? result =
await FilePicker.platform.pickFiles(
type: FileType.media,
allowMultiple: false,
);
But when i try to pick an image from my android phone (API level 33) or android emulator (API level 34), the file_picker just returns 'null' and 'User cancelled the picker request'.
print(result);
Output:
I/FilePickerDelegate( 1841): User cancelled the picker request
I/flutter ( 1841): null
Any idea what is going on here?
If i create an emulator with API level 31 or below, everything works as expected and i can pick images from all sorts of folders.
Thanks in advance!
*You should give permission for access storage from gallery.
and update like this,