getWeekDayDate method

String getWeekDayDate({
  1. bool shortWeekDay = false,
  2. bool includeSuffix = false,
})

Fri 18th or Friday 18th

Implementation

String getWeekDayDate(
    {bool shortWeekDay = false, bool includeSuffix = false}) {
  String dayName = weekdays[this.weekday] ?? '';
  String date = includeSuffix ? _getValueWithSuffix(day) : '$day';

  if (shortWeekDay) {
    dayName = dayName.substring(0, 3);
  }

  return '$dayName $date';
}