jinja 0.0.8+1 copy "jinja: ^0.0.8+1" to clipboard
jinja: ^0.0.8+1 copied to clipboard

outdated

Jinja2 server-side template engine for Dart. Variables, expressions, control structures and template inheritance.

example/example.dart

import 'package:jinja/jinja.dart';

void main() {
  const source = '{% for user in users %}'
      '{{ user["fullname"] }}, {{ user["email"] }}; '
      '{% else %}No users{% endfor %}';

  final env = Environment();
  final template = env.fromSource(source, path: 'index.html');

  print(template.render({
    'users': [
      {'fullname': 'Jhon Doe', 'email': 'jhondoe@unknown.dev'},
      {'fullname': 'Jane Doe', 'email': 'janedoe@unknown.dev'},
    ]
  }));
}
32
likes
0
pub points
86%
popularity

Publisher

unverified uploader

Jinja2 server-side template engine for Dart. Variables, expressions, control structures and template inheritance.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

path, string_scanner

More

Packages that depend on jinja