Closed pablo-johnson closed 1 year ago
i have this issue but i found this package don't check year of date, for 2021 year worked correctly but 2022 not working how to fixed this issue?
I fixed by sort list by this line:
////sort new to last
_media?.sort((a, b) => b.modifiedDate!.compareTo(a.modifiedDate!));
`MediaPage mediaPage = await widget.album.listMedia(newest: true);
setState(() {
_media = mediaPage.items;
_media?.sort((a, b) => b.modifiedDate!.compareTo(a.modifiedDate!));
});
Thank you for your solution. It may work in some cases. In my case, I am also doing pagination so your solution is not suitable. But it may work in case someone does not use pagination.
Hi, do you know if this has been solved yet. Working with paging does not work.
Solved after version 1.2.2. But it's highly recommended to use version 2.0.0 in new projects, because the brand new API can get a better experience.
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.
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale en-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.63.2) [✓] Connected device (1 available)