Week.fromWireName constructor
Week.fromWireName(
- String wireName
Creates week with a decoded json object from countries
Implementation
factory Week.fromWireName(String wireName) {
switch (wireName) {
case mondayWireName:
return monday;
case tuesdayWireName:
return tuesday;
case wednesdayWireName:
return wednesday;
case thursdayWireName:
return thursday;
case fridayWireName:
return friday;
case saturdayWireName:
return saturday;
case sundayWireName:
return sunday;
default:
throw ArgumentError('UnSupported wireName: $wireName');
}
}