decode method
- dynamic value
override
Implementation
@override
TeamColor decode(dynamic value) {
switch (value) {
case 'pink':
return TeamColor.pink;
case 'red':
return TeamColor.red;
case 'orange':
return TeamColor.orange;
case 'yellow':
return TeamColor.yellow;
case 'green':
return TeamColor.green;
case 'blue':
return TeamColor.blue;
case 'indigo':
return TeamColor.indigo;
case 'purple':
return TeamColor.purple;
case 'brown':
return TeamColor.brown;
case 'white':
return TeamColor.white;
case 'black':
return TeamColor.black;
default:
throw MapperException.unknownEnumValue(value);
}
}