genderFromApiString function

Gender genderFromApiString(
  1. String gender
)

Implementation

Gender genderFromApiString(String gender) {
  switch (gender.toLowerCase()) {
    case 'male':
      return Gender.male;
    case 'female':
      return Gender.female;
    case 'nonbinary':
    case 'non-binary':
      return Gender.nonBinary;
    default:
      return Gender.unknown;
  }
}