encode method
Implementation
@override
dynamic encode(BloodGroup self) {
switch (self) {
case BloodGroup.aPositive:
return "A+";
case BloodGroup.bPositive:
return "B+";
case BloodGroup.oPositive:
return "O+";
case BloodGroup.abPositive:
return "AB+";
case BloodGroup.aNegative:
return "A-";
case BloodGroup.bNegative:
return "B-";
case BloodGroup.abNegative:
return "AB-";
case BloodGroup.oNegative:
return "O-";
}
}