renderDocumentShell method
Renders a complete HTML5 document shell with Jaspr root container.
Implementation
String renderDocumentShell({required String bodyHtml, String? currentUrl}) {
final headHtml = MetaMantleHead(
metadata: metadata,
config: config,
).toHtmlString(currentUrl: currentUrl);
final buf = StringBuffer();
buf.writeln('<!DOCTYPE html>');
buf.writeln('<html lang="$lang">');
buf.writeln('<head>');
buf.writeln(headHtml);
buf.writeln('</head>');
buf.writeln('<body>');
buf.writeln('<div id="jaspr-root">');
buf.writeln(bodyHtml);
buf.writeln('</div>');
if (includeFlutterBootstrap) {
buf.writeln('<script src="flutter_bootstrap.js" async></script>');
}
buf.writeln('</body>');
buf.writeln('</html>');
return buf.toString();
}