ExampleInfo.fromXmlElement constructor

ExampleInfo.fromXmlElement(
  1. XmlElement data
)

Implementation

factory ExampleInfo.fromXmlElement(XmlElement data) {
  final type = data.getElement(ApiXmlElement.type.name)!.innerText.trim();
  final example =
      data.getElement(ApiXmlElement.example.name)!.innerText.trim();
  return ExampleInfo(
    type: type,
    example: example,
  );
}