findLastDateOfPreviousWeek static method
Find last date of previous week using a date in current week.
dateTime
A date in current week.
Implementation
static DateTime findLastDateOfPreviousWeek(DateTime dateTime) {
final DateTime sameWeekDayOfLastWeek =
dateTime.subtract(const Duration(days: 7));
return findLastDateOfTheWeek(sameWeekDayOfLastWeek);
}