daysInWeek method

List<DateTime> daysInWeek (DateTime week)

Returns a list of DateTimes in a given week, with 7 items ranging from Sunday to Saturday.

Implementation

static List<DateTime> daysInWeek(DateTime week) {
  final first = firstDayOfWeek(week);
  final last = lastDayOfWeek(week);

  return daysInRange(first, last).toList();
}