Finished inbox, fixed reverse sort order, bloc refactorings

This commit is contained in:
Anton Stubenbord
2022-11-30 01:24:28 +01:00
parent 50190f035e
commit b1db2a1209
27 changed files with 1144 additions and 632 deletions

View File

@@ -22,3 +22,17 @@ extension DuplicateCheckable<T> on Iterable<T> {
return toSet().length != length;
}
}
extension DateHelpers on DateTime {
bool get isToday {
final now = DateTime.now();
return now.day == day && now.month == month && now.year == year;
}
bool get isYesterday {
final yesterday = DateTime.now().subtract(const Duration(days: 1));
return yesterday.day == day &&
yesterday.month == month &&
yesterday.year == year;
}
}