encode method

  1. @override
dynamic encode(
  1. BloodGroup self
)

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-";
  }
}