currentWeek static method
Returns a DateTimeRange covering the whole current week (Mon–Sun).
Implementation
static DateTimeRange currentWeek() {
final DateTime now = DateTime.now();
final DateTime monday =
now.subtract(Duration(days: now.weekday - DateTime.monday));
final DateTime sunday = monday.add(const Duration(days: 6));
return DateTimeRange(start: monday, end: sunday);
}