encode method

  1. @override
XmlNode encode(
  1. Object? value,
  2. XmlCodecEncodeSignature? encode
)
override

Implementation

@override
XmlNode encode(Object? value, XmlCodecEncodeSignature? encode) =>
    switch (value) {
      _ when value is T => XmlElement(
          XmlName(nodeLocalName),
          [],
          [XmlText(encodeValue(value))],
        ),
      _ => throw ArgumentError(),
    };