sort method
dynamic
sort()
Implementation
sort() {
dateCategories.sort((a, b) => b.dateTime.compareTo(a.dateTime));
for (var category in dateCategories) {
category.files.sort((a, b) {
if (a.medium == null) {
return 1;
} else if (b.medium == null) {
return -1;
} else {
return b.medium!.lastDate!.compareTo(a.medium!.lastDate!);
}
});
}
}