@override dynamic encode(Gender self) { switch (self) { case Gender.male: return "MALE"; case Gender.female: return "FEMALE"; case Gender.other: return "OTHER"; } }