weekFirstDay method

DateTime weekFirstDay([
  1. int firstDay = DateTime.sunday
])

Implementation

DateTime weekFirstDay([int firstDay = DateTime.sunday]) => subtract(
      Duration(
        days: weekday - firstDay + (weekday - firstDay < 0 ? 7 : 0),
      ),
    ).mergeStart();