toggleGender static method

String toggleGender(
  1. String map
)

The counterpart of map in the other body, e.g. Maps.FRONT_BODY -> Maps.FEMALE_FRONT_BODY.

Implementation

static String toggleGender(String map) {
  final from = familyOf(map);
  final to = isFemale(map) ? male : female;
  final index = from.indexOf(map);
  return index == -1 ? map : to[index];
}