fromPrototype static method

XmlElement? fromPrototype(
  1. String? prototype,
  2. String id
)

Implementation

static XmlElement? fromPrototype(String? prototype, String id)
{
  if ((prototype != null))
  {
    prototype = prototype.replaceAll(placeholder, id);
    var document = Xml.tryParse(prototype);
    var node = document != null ? document.rootElement : null;
    return node;
  }
  return null;
}