deserialize method
Deserializes the FML template elements, attributes and children
Implementation
@override
void deserialize(XmlElement xml)
{
// deserialize
super.deserialize(xml);
// properties
double ratio = S.toDouble(Xml.get(node: xml, tag: 'ratio')) ?? -1;
if (ratio >= 0 && ratio <= 1)
{
if (vertical)
height = "${ratio * 100}%";
else width = "${ratio * 100}%";
}
dividerColor = Xml.get(node: xml, tag: 'dividercolor');
dividerWidth = Xml.get(node: xml, tag: 'dividerwidth');
dividerHandleColor = Xml.get(node: xml, tag: 'dividerhandlecolor');
// remove non view children
children?.removeWhere((element) => !(element is ViewModel));
}