sortAlbumMediaDates static method
Implementation
static List<Medium> sortAlbumMediaDates(List<Medium> mediumList) {
mediumList.sort((a, b) {
if (a.lastDate == null) {
return 1;
} else if (b.lastDate == null) {
return -1;
} else {
return b.lastDate!.compareTo(a.lastDate!);
}
});
return mediumList;
}