fromXml static method

VariableModel? fromXml(
  1. WidgetModel parent,
  2. XmlElement xml, {
  3. String? type,
  4. bool? constant,
})
override

Implementation

static VariableModel? fromXml(WidgetModel parent, XmlElement xml,
    {String? type, bool? constant}) {
  VariableModel? model;
  try {
    model = VariableModel(parent, Xml.get(node: xml, tag: 'id'),
        type: type, constant: constant);
    model.deserialize(xml);
  } catch (e) {
    Log().exception(e, caller: 'variable.Model');
    model = null;
  }
  return model;
}