build method
Builds the HTML string.
Implementation
String build() {
final html = StringBuffer();
html.write('<html>\n');
html.write('<head>\n');
if (title.isNotEmpty) {
html.write('<title>$title</title>\n');
}
if (styles.isNotEmpty) {
html.write('<style>\n$styles\n</style>\n');
}
html.write('</head>\n');
var bodyStyles = this.bodyStyles;
html.write('<body'
'${bodyStyles.isNotEmpty ? ' style="$bodyStyles"' : ''}'
'>\n');
_writeObject(html, top);
_writeObject(html, content);
_writeObject(html, footer);
html.write('</body>\n');
html.write('</html>\n');
return html.toString();
}