Document.template constructor
Loads an external .template.html
file from the filesystem and attaches the provided
child component to that template.
The name
(default 'index') defines which template file to load: web/<name>.template.html
.
The attachTo
(default 'body') defines where to attach the child component in the loaded template.
Implementation
const factory Document.template({
String name,
String attachTo,
required Component child,
}) = TemplateDocument;