createHtmlElement method
Creates and returns a WebHTMLElement to represent this object in the DOM.
Returns null if no element should be created.
Implementation
@override
WebHTMLElement? createHtmlElement() {
if (!kIsWeb) return null;
// Create the corresponding HTML element for SEO.
final element =
webWindow.document.createElement(tag.name) as WebHTMLElement;
element.textContent = text;
element.id = id ?? _generateRandomId();
return element;
}