getWeekdays method
本周所有日期
firstWeekDay
- 设置每周起始日, assert(firstWeekDay > 0 && firstWeekDay < 7)
Implementation
List<DateTime> getWeekdays([int firstWeekDay = 1]) {
assert(firstWeekDay > 0 && firstWeekDay < 7);
DateTime _day = firstDayInWeek(firstWeekDay);
return List.generate(7, (index) => _day.add(Duration(days: index)));
}