writeTo method

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

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(
            attributes: {
              'name': 'viewport',
              'content': 'width=device-width, initial-scale=1',
            },
          ),
          Element('title', children: [title]),
          ...head,
        ],
      ),
      Element('body', children: body),
    ],
  ).writeTo(out);
}