parse static method

ByDay parse(
  1. String byDayString
)

Implementation

static ByDay parse(String byDayString) {
  return ByDay(
    preCount: int.tryParse(byDayString.length > 2 ? byDayString.substring(0,byDayString.length-2) : ''),
    day: Days.values.firstWhere((e)=>e.name.toUpperCase() ==  byDayString.substring(byDayString.length-2,byDayString.length).toUpperCase())
  );
}