endOfWeek property

DateTime get endOfWeek

Returns the Sunday of this week.

Implementation

DateTime get endOfWeek => DateTime(year, month, day + 7 - weekday + 1)
    .add(const Duration(microseconds: -1));