What is the difference between image_picker plugin and the file_picker plugin - flutter

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

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.

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

Flutter Menu App that gets pictures from firebase

I have a flutter app that is a menu for a restaurant. Now the problem is that I want to get the pictures from firebase. Currently, if you open the app, the pictures take time to load and you can see that with your eyes, it is a bit annoying and not practical regarding bandwidth data usage.
Is there any chance I can cache the images when I get them from firebase and than appear instantly? I request the links of the images once the page is open using a future and display them with a CachedNetworkImageProvider() with the image URL but that still takes time to load the images. Is there a way to download all the data in the firebase at once when you open the app and not check every time you open the app?
for all apps that require fetching images from a remote location, what i have been doing so far is download the image locally and use the local image instead of the remote one if it exists locally, from my knowledge cachedNetworkImage only caches the image after fetching when the app is currently running and refetches the image when the user restarts the app.
Please if you do find another way to cache images that would be cool and remove a lot of boiler plate code, please do post it, thanks.

Flutter: How to display phone gallery on a container?

I found a way to display live camera on a container(). But I want to display gallery on Container() in app and control like photo example.
Is it possible in flutter ?
I'm not sure it would be possible to implement this but one things I have thought of is to request External Storage Access and maybe get the directory where all photo are stored and display the from File. However, this approach may need to a lot exceptions thrown.
I normal image_picker invokes the native channel to be able show the Android Native UI and same for iOS.

How to get all the Photos from Built In Gallery into our application without using UIPickerController

I have been using UIPickerController to get the pics from my Built-in-Gallery into my own Application, But the issue is that the delegate related to that UIPickerCOntroller get only one pic at a time and returns me only one image. So i need to get the images one by one from PHotoGallery.
Now i want to implement my own Photo-Gallery so that i could get multiple images from Built-In photo Gallery.
Can you guys guide me how to access Builtin Gallery photo Folders and fetch all images from there into my Array so that i can make my own Photo Gallery with Multiple Selection Option
Or PLease tell me if i can manage the Multiple Selection Option from UIPickerController.
I guess Apple should provide us atleast this sort of feature that we can select multiple photos at a time from Photo gallery.
PLease guys Can u guide me with some code from any of these two Options
Thanks
you want to use the Assets Library framework. take a look at this blog post for more details:
http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/

creating iphone app for existing site. need advice about the data I'm downloading

I'm building an iPhone app for existing site (a local news site)
Main page with articles headers, when click on them you move to the article page. Simple.
This is the first time I'm building such type of app.
I have 3 general questions, just to make sure :
For the iphone, Do we need to
re-create the website article's
pictures for the iphone ? or there
is some programming tool that on the
fly make the files looks better on
the iphone ? or maybe, there is some
technique that creates one artice
picture that looks right both for
the server and the iphone ?
Usually, Do you need to create
special data channels from the
iPhone webservice ? or programmers
just use the existing rss channels
of the webserver ?
If someone know nice artice about
this stuff, It will help a lot. just
see what other are doing.
thanks.
You can see the intent Media apps, these apps are working like what you want your app to.
1) You're better off creating mobile versions of the images. You can do image processing on the iPhone, but you'll have to have the original and that makes the whole thing pointless (ie. you have to download the whole thing.) Generate a mobile thumbnail when those are uploaded on the server.
2) RSS will do. There's a very good tutorial at cocoadevblog.com about approaching such a task (I guess this covers 75% of the work you have to do)
3) Check 2) ;-)
if your download image is bigger the the thumbnail you are trying to display,
then the problem is in your code that change the image size. check carefully what are you doing to the image after downloading it.
I would recommend to create square thumbnails of your pictures at the server level. This will allow you to easily position in the iPhone screen, plus you will not need to download the whole image from the server.
nnahum

Displaying Photos on iPhone

I'm working on an iPhone app and I need to be able to display images to users. I have already gotten the code that takes the photo and stores it into the filesystem working well. Now I just need to figure out how to display the image.
I've looked at the Three20 project I've read about on a few of the posts here, but it seems a bit cumbersome and like an extra dependency to import link and combine all of the Three20 library into my little app.
Are there any other ways or a more streamlined library that will let me display photos to my users?
Thanks!
B.
Throw a UIImageView on the screen? Or ask a more specific question if that is not what you want.