getWife method

IndividualElement? getWife(
  1. Map<String, GedcomElement> elementsMap
)

Returns the wife/mother of the family

Returns null if not found

Implementation

IndividualElement? getWife(Map<String, GedcomElement> elementsMap) {
  final wifeId =
      children.firstWhereOrNull((element) => element.tag == GEDCOM_TAG_WIFE);
  if (wifeId != null) {
    final wife = elementsMap[wifeId.value!];
    return wife as IndividualElement?;
  }
  return null;
}