template_engine 0.0.1 copy "template_engine: ^0.0.1" to clipboard
template_engine: ^0.0.1 copied to clipboard

outdated

A Dart package to parse and render templates, using (nested) variables and custom tags.

A Dart library to parse and render templates.

Features #

  • Use variables and nested variables

Getting started #

See: Installing

Usage #

import 'package:template_engine/template_engine.dart';

void main() {
  var template = TextTemplate('Hello {{name}}.');
  // See also FileTemplate and WebTemplate
  var engine = TemplateEngine(variables: {'name': 'world'});
  var model = engine.parse(template);
  // Here you could additionally mutate or validate the model if needed.
  print(engine.render(model)); // should print 'Hello world.';
}

For more see: Examples

5
likes
0
points
106
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package to parse and render templates, using (nested) variables and custom tags.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, petitparser, recase

More

Packages that depend on template_engine