addSubstructure method

  1. @override
Gedcom7Structure addSubstructure({
  1. required String tag,
  2. String? xref,
  3. String? lineVal,
})

Creates a structure, adds it to substructures and returns created substructure.

Implementation

@override
Gedcom7Structure addSubstructure({
  required String tag,
  String? xref,
  String? lineVal,
}) {
  final newStructure = Gedcom7Structure.parse(
    level: substructuresLevel,
    tag: tag,
    xref: xref,
    lineVal: lineVal,
    substructures: null,
  );
  substructures.add(newStructure);
  return newStructure;
}