lastDayOfWeek property

DateTime get lastDayOfWeek

Returns DateTime object of Last Day of the week.

final checkDate =
     DateTime.parse('2023-09-16 20:18:00.123456789z');
checkDate.lastDayOfWeek;         // 17-09-2023

This will not consider time Parameters.

Implementation

DateTime get lastDayOfWeek => firstDayOfWeek.superAdd(days: 6);