addSubstructure method
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;
}