genderLogic method
Internal: Implements the logic for gender selection - use gender for normal messages.
Implementation
static genderLogic(String targetGender,
{female, male, other, String locale}) {
if (other == null) {
throw new ArgumentError("The 'other' named argument must be specified");
}
switch (targetGender) {
case "female":
return female == null ? other : female;
case "male":
return male == null ? other : male;
default:
return other;
}
}