deserialize method
Deserializes the FML template elements, attributes and children
Implementation
@override
void deserialize(XmlElement xml) {
super.deserialize(xml);
// properties
tryharder = Xml.get(node: xml, tag: 'tryharder');
invert = Xml.get(node: xml, tag: 'invert');
// barcode formats
String? format = Xml.get(node: xml, tag: 'format');
List<String> formats = [];
if (format != null) formats = format.split(",");
for (String format in formats) {
format = format.trim().toUpperCase();
BarcodeFormats? f = toEnum(format, BarcodeFormats.values);
if (f != null) {
barcodeFormats ??= [];
if (!barcodeFormats!.contains(f)) barcodeFormats!.add(f);
}
}
}