html_template 0.4.0 copy "html_template: ^0.4.0" to clipboard
html_template: ^0.4.0 copied to clipboard

A server-side HTML template engine based on String interpolation.

0.4.0 #

  • Allow to set a master template within a template.
@template
void _productTemplate(Product product) {
  // ... the template
  
  // Call this to automatically wrap productTemplate in the pageTemplate
  template.master = (body) => pageTemplate(title: product.name, body: body);
}

@template
void _pageTemplate({required String title, required TrustedHtml body}) {
  '''
<html>
  <head><title>$title</title></head>
  <body>$body</body>
</html>
  ''';
}
 

0.3.1 #

  • Upgrade dependencies

0.3.0 #

  • Fix alternative loop syntax
  • Fix <doctype>

0.2.2 #

  • Replace package:pedantic with package:lints
  • Upgrade package:analyzer dependency.

0.2.1 #

  • Support latest version of dependencies

0.2.0 #

  • Support null-safety

0.1.1 #

  • Improve pub score

0.1.0 #

  • Initial version, created by Stagehand
16
likes
150
points
3.44k
downloads

Publisher

verified publisherxaha.dev

Weekly Downloads

A server-side HTML template engine based on String interpolation.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, build, dart_style, html, source_gen

More

Packages that depend on html_template