Home > Software design >  What is the difference between image_picker plugin and the file_picker plugin
What is the difference between image_picker plugin and the file_picker plugin

Time:06-07

can someone please explain the difference in these plugins and what are the advantages of using each and whether they do the same work or maybe they each do a completely different task

CodePudding user response:

Short Answer: Always use image picker if you want to get images from the user. Otherwise, use file_picker.

Long Answer: Both image picker and file picker open another app that returns an image/file that the user picked. The advantage of image_picker over file picker is that the user gets to use their installed gallery app to pick images. This is a familiar environment to the user and is generally a lot easier to use than the generally more unfamiliar file explorer on android. The disadvantage on the other hand is that it only works for images.

So, always use image picker if you want to get images from the user. Otherwise, use file_picker.

CodePudding user response:

There is a main difference on iOS devices, file picker will redirect you to the files app, while image picker will redirect you to the gallery.

In iOS, and unlike android, Images and files exist in two completely different places, so depending on what you want to fetch you need to use the right package

  • Related