findLastDateOfTheWeek static method
Find last date of the week which contains provided date.
Assume Monday
is the first day of the week and
Sunday
is the last day of the week
Implementation
static DateTime findLastDateOfTheWeek(DateTime dateTime) =>
dateTime.add(Duration(days: DateTime.daysPerWeek - dateTime.weekday));