writeTo method

  1. @override
void writeTo(
  1. StringSink out
)
override

Writes the node's HTML to out.

Implementation

@override
void writeTo(StringSink out) {
  out.write('<!doctype html>');
  Element(
    'html',
    attributes: {'lang': lang},
    children: [
      Element(
        'head',
        children: [
          meta(attributes: {'charset': 'utf-8'}),
          meta(
            name: 'viewport',
            content: 'width=device-width, initial-scale=1',
          ),
          Element('title', children: [title]),
          ...head,
        ],
      ),
      Element('body', attributes: bodyAttributes, children: body),
    ],
  ).writeTo(out);
}