liquid_engine
0.2.2, released 5 years ago by an unverified publisher
A Dart port of the Liquid and Django HTML template engine.
What it does
Parses and renders HTML templates using context variables, loops, filters, and standard template tags. Supports features like whitespace control, booleans, and asynchronous rendering.
AI-written summary of version 0.2.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate HTML or text content dynamically from templates in Dart.
- You want to use Liquid or Django template syntax within a Dart application.
Skip it when
- You are building standard Flutter widget UIs where standard Flutter widget composition is preferred.
- You need a complex state management or navigation system.
Strengths
- Familiar Liquid and Django template syntax.
- Supports async rendering and web platform.
Weaknesses
- Limited documentation outside of basic examples.
- Niche use case for most standard mobile app development.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
import 'package:liquid_engine/liquid_engine.dart';
main() async {
final raw = '<html><title>{{ title | default: "Liquid"}}</title></html>';
final context = Context.create();
final template = Template.parse(context, Source.fromString(raw));
print(await template.render(context));
}Alternatives
Packages that do the same job and could replace liquid_engine.
- liquify
A powerful and extensible Liquid template engine for Dart.
72Compare - jinja
Jinja2 template engine port for Dart supporting variables, control structures, and template inheritance.
84Compare - fhir_path
Model-independent FHIRPath evaluation engine in Dart, port of the Java reference implementation.
73Compare - baseflow_plugin_template
A template for plugin examples
53Compare
Works with
Packages commonly used together with liquid_engine: ones it builds on, ones built on it, and its own family.