createElement function

Element createElement(
  1. String name, [
  2. BindingContext? context
])

Implementation

Element createElement(String name, [BindingContext? context]){
  ElementCreator? creator = _elementRegistry[name];
  if (creator == null) {
    print('Unexpected element "$name"');

    return _UnknownElement(context);
  }

  Element element = creator(context);
  // Assign tagName, used by inspector.
  element.tagName = name;
  return element;
}