Firelands128 / photo_gallery

A Flutter plugin that retrieves images and videos from mobile native gallery.
BSD 3-Clause "New" or "Revised" License
68 stars 63 forks source link

Missing images #22

Closed allanctan closed 3 years ago

allanctan commented 3 years ago

When I retrieve images, it seems to retrieve a different result again the default phone image gallery. Also, newer photos uploaded is not in the list when refreshed.

allanctan commented 3 years ago

Upon checking further, it appears the images is sorted ascending, so the first item is the oldest image and last item is the latest. Perhaps adding clarification in the documentation would be helpful to others as well.

HectorPalacio commented 3 years ago

I have the same problem, the request is not giving me all the pics from the album, for example: my Whatsapp Image album have around of 25000 images, but, the request is bringing me only 8, it's so weird, maybe is a problem with the cache, i don't know, and, for sort the pics, you can use the .sort() method on this way:

imagenes.sort((a, b) => b.modifiedDate.compareTo(a.modifiedDate));

I sort the pics from the Date, but you can do it how do you want.

Firelands128 commented 3 years ago

You can specify newest argument in listMedia function to sort the result ascending or descending as you want.