decode method
Implementation
@override
BloodGroup decode(dynamic value) {
switch (value) {
case "A+":
return BloodGroup.aPositive;
case "B+":
return BloodGroup.bPositive;
case "O+":
return BloodGroup.oPositive;
case "AB+":
return BloodGroup.abPositive;
case "A-":
return BloodGroup.aNegative;
case "B-":
return BloodGroup.bNegative;
case "AB-":
return BloodGroup.abNegative;
case "O-":
return BloodGroup.oNegative;
default:
throw MapperException.unknownEnumValue(value);
}
}