toDayOfWeek method
Implementation
DayOfWeek toDayOfWeek() {
switch (this) {
case 'MONDAY':
return DayOfWeek.monday;
case 'TUESDAY':
return DayOfWeek.tuesday;
case 'WEDNESDAY':
return DayOfWeek.wednesday;
case 'THURSDAY':
return DayOfWeek.thursday;
case 'FRIDAY':
return DayOfWeek.friday;
case 'SATURDAY':
return DayOfWeek.saturday;
case 'SUNDAY':
return DayOfWeek.sunday;
}
throw Exception('$this is not known in enum DayOfWeek');
}