fromXml static method

TimerModel? fromXml(
  1. WidgetModel parent,
  2. XmlElement xml, {
  3. String? type,
})
override

Implementation

static TimerModel? fromXml(WidgetModel parent, XmlElement xml,
    {String? type}) {
  TimerModel? model;
  try {
    model = TimerModel(parent, Xml.get(node: xml, tag: 'id'));
    model.deserialize(xml);

    // start the timer
    model.start();
  } catch (e) {
    Log().exception(e, caller: 'timer.Model');
    model = null;
  }
  return model;
}