how to allow to pick both images from gallery and files from storage in iOS flutter with file_picker package


For images and files upload features,I used file_picker package. It works fine in android but in iOS, it only allow files from Recents, Shared, Browse tabs from iPhone and not allow to pick images from gallery. And I don’t know how to go where all images from gallery located.

Here is my method.

Future<FilePickerResult?> filePicker() async {
  return FilePicker.platform.pickFiles(
      type: FileType.custom,
      allowedExtensions:['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx']);
}

Here is permission that added in info.plist

    <key>NSPhotoLibraryUsageDescription</key>
    <string>This app requires photos access to function properly.</string>
    <key>NSCameraUsageDescription</key>
    <string>This app requires camera access to function properly.</string>

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img