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

Sorting not working #25

Closed fedeamura closed 3 years ago

fedeamura commented 3 years ago

` The "newest" parameter do nothing. I got the same result with true or false.

return widget.album.listMedia( newest: true, ); `

HectorPalacio commented 3 years ago

Hi, 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.

I hope help you.

fedeamura commented 3 years ago

yea, but if a get the info paginated i cant use this sort method

fedeamura commented 3 years ago

any news on this?

Firelands128 commented 3 years ago

Sorry for the late reply. I have fix this bug in version 1.1.1.

pablo-johnson commented 2 years ago

Hi, I can still reproduce this issue on Android 11 with version 1.1.1.

I always get the oldest photo first when listing the media from an album, no matter if I specify the newest parameter as true or false.