Document constructor
const
Document({})
Sets up a basic document structure at the root of your app and renders the main <html>
, <head>
and <body>
tags.
The title
and base
parameters are rendered as the <title>
and <base>
elements respectively.
The charset
, viewport
and meta
values are rendered as <meta>
elements in <head>
.
The styles
parameter is rendered to css in a <style
element inside <head>
.
The head
components are also rendered inside <head>
.
The body
component is rendered inside the <body>
element.
Implementation
const factory Document({
String? title,
String? lang,
String? base,
String? charset,
String? viewport,
Map<String, String>? meta,
List<StyleRule>? styles,
List<Component> head,
required Component body,
}) = BaseDocument;