genderLogic method

dynamic genderLogic (String targetGender, { dynamic female, dynamic male, dynamic other, String locale })

Internal: Implements the logic for gender selection - use gender for normal messages.


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;
      return other;