fromXml static method

Distinct? fromXml(
  1. WidgetModel? parent,
  2. XmlElement xml
)
override

Implementation

static Distinct? fromXml(WidgetModel? parent, XmlElement xml) {
  String? id = Xml.get(node: xml, tag: 'id');
  if (isNullOrEmpty(id)) id = newId();

  Distinct model = Distinct(parent,
      id: id,
      enabled: Xml.get(node: xml, tag: 'enabled'),
      field: Xml.get(node: xml, tag: 'field'));
  model.deserialize(xml);
  return model;
}