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 parameter is rendered as the <title> element.
The lang parameter is set as the lang attribute on the <html> element.
The base parameter is rendered as the <base href=...> element and defaults to '/'.
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;