Sub web component in Dart


Is it possible to make sub web components in Dart ?

Say, for example, I have a x-chatwindow custom element and I would like it to have an x-textarea and x-textinput sub component.

A fictional implementation would be :



Is there a specific problem you are facing?

You can use the <content></content> inside your ChatWindowComponent template:

<element name="x-chat-window" constructor="ChatWindowComponent" extends="div">

Then the page where you use them:

<!DOCTYPE html>
    <link rel="components" href="components/chat_window.html" />
    <link rel="components" href="components/text_area.html" />
    <link rel="components" href="components/text_input.html" />

Answered By – Kai Sellgren

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.