toXml method

XMLNode toXml()

Implementation

XMLNode toXml() {
  return XMLNode(
    tag: 'option',
    attributes: {
      if (label != null) 'label': label,
    },
    children: [
      XMLNode(
        tag: 'value',
        text: value,
      ),
    ],
  );
}