jinja
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.7.0
79K downloads/mo
#1220 most downloaded on pub.dev
ykmnkmi/jinja.dart
What this package is like to depend on
Last release 1 months ago
14 Jul 2026
Release timing varies
gaps range from 1 weeks to 8 months
Some releases are documented
notes for 13 of 33 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
50 releases · first in 2019
4 releases in the last 12 months
see the full history below
Release timeline
50 releases · Jan 2019 to Jul 2026Releases
latest 50-
0.7.014 Jul 2026Release notes
Open source →- Fix
unnecessary_library_name. - Continue CI work on fail.
- Bump SDK version to 3.12.0.
- Refactoring exceptions.
- Lexer rewrite.
- Update environment and parser.
- Remove
name, use onlypath. - Excpetions. Rename
nametopath. - Update README.md.
- 0.7.0
Release notes
Open source →- Bump SDK version to 3.12.0.
- Internal changes:
Lexerrewrite
- Renamed:
TemplateNotFound:nametopath
TemplatesNotFound:namestopaths
- Deprecated:
TemplateNotFound:name
TemplatesNotFound:names
- Fix
-
0.6.718 May 2026 -
0.6.616 May 2026 -
0.6.504 Oct 2025Release notes
Open source →- Added:
- Expressions:
- Ternary operator (
condition ? trueValue : falseValue) as alternative to if-else expressions{{ user.isAdmin ? "Admin Panel" : "User Panel" }} {{ score > 60 ? "Pass" : "Fail" }} - Null coalescing operator (
??) equivalent toor{{ variable ?? "default" }} {{ var1 ?? var2 ?? "final" }}
- Ternary operator (
- Variable names now support
#and@characters{{ #var }}, {{ var# }}, {{ @variable }}
- Expressions:
- Fixed:
- Optimizer bug in dict literal constant evaluation
- Added:
-
0.6.409 Jul 2025 -
0.6.325 Jun 2025 -
0.6.212 Mar 2025Release notes
Open source →- Added:
- Statements:
try-catchblock:{% try %} {{ x / y }} {% catch exception %} {{ exception | runtimetype }}: {{ exception }} {% endtry %}
- Filters:
runtimetype
- Statements:
- Added:
-
0.6.120 Feb 2025Release notes
Open source →- Added:
- List slices
{{ list[start:stop] }}. UndefinedErrorexceptionUndefinedFactorytypedefEnvironment:Environment({UndefinedFactory undefined})argumentUndefinedFactory undefinedfield
Template:Template({UndefinedFactory undefined})argument
- Filters:
null(nonealias)
- List slices
- Added:
-
0.6.1-dev.527 Sep 2024 pre-releaseNothing published for this version
-
0.6.1-dev.212 May 2024 pre-releaseNothing published for this version
-
0.6.1-dev.011 May 2024 pre-release withdrawnNothing published for this version
-
0.6.030 Mar 2024Release notes
Open source →- Bump SDK version to 3.3.0.
- Update dependencies.
- Internal changes.
chromeplatform tests.- Added:
- Statements:
importfrom
Template:Template.fromNode({globals})argumentglobalsfield
- Statements:
- Restored:
- Conditional and variable
extendsstatement variants - Choice, ignore missing and variable
includestatement variants
- Conditional and variable
- Changed:
Environment:Environment.lex()return fromList<Token>toIterable<Token>Environment.scan(tokens)argument type fromList<Token>toIterable<Token>
- Removed:
- Exceptions:
FilterArgumentError
*argsand**kwargssupport
- Exceptions:
-
0.5.007 Aug 2023Release notes
Open source →- Minimal SDK version: 3.0.0.
- Internal changes.
- Added:
Template:Template.fromNode(Environment environment, {String? path, required Node body})constructor
- Statements:
macrocall
- Filters:
itemstitle
- Changed:
Environment:Environment({modifiers})argument type fromList<NodeVisitor>toList<Node Function(Node)>modifierstype fromList<NodeVisitor>toList<Node Function(Node)>scan(...)return type fromList<Node>toNodeparse(...)return type fromList<Node>toNode
Template:Template({modifiers})argument type fromList<NodeVisitor>toList<Node Function(Node)>
- Filters:
truncatearguments are now positional
- Removed:
Template:Template.fromNodes(...)constructor
- Statements:
autoescape
- Filters:
forceescapesafeunsafe
- Tests:
escaped
-
0.5.0-dev.2525 Jun 2023 pre-releaseNothing published for this version
-
0.5.0-beta.3027 Jul 2023 pre-releaseNothing published for this version
-
0.4.222 Jan 2023 -
0.4.115 Jan 2023 -
0.4.015 Jan 2023Release notes
Open source →- Minimal SDK version: 2.18.0.
- Added:
passContextandpassEnvironmentfunctionsprintto globals{{ do print(name) }}EnvironmentEnvironment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates})constructor argumentsautoReloadfieldlexerfieldlineCommentPrefixfieldlineStatementPrefixfieldloaderfieldmodifiersfieldnewLinefieldlexmethodscanmethodparsemethod
TemplateTemplate({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})constructor argumentsrenderTomethod
- Exceptions (was internal):
TemplateErrorTemplateSyntaxErrorTemplateAssertionErrorTemplateNotFoundTemplatesNotFoundTemplateRuntimeErrorFilterArgumentError
- Statements:
dowith
- Filters:
dictsortreplacereversesafeslicestriptagstruncatewordcountwordwrapitemmaptojson
- Test:
filtertest
- Changed:
FieldGettertype definition renamed toAttributeGetterdefaultfilter compare values withnull, no boolean argumentdefinedandundefinedtests compare values withnullEnvironmentEnvironment({getField})constructor argument renamed togetAttributegetFieldfield renamed togetAttribute
TemplateTemplate({parent})constructor argument renamed toenvironmentand doesn't copy the environmentrenderMapmethod renamed torender
Loader.listSourcesmethod renamed tolistTemplatesMapLoader.mappingfield renamed tosourcesFileSystemLoaderFileSystemLoader({paths})argument is now non-nullable, defaults to['templates']- moved to
package:jinja/loaders.dartlibrary
package:jinja/get_field.dartlibrary renamed topackage:jinja/reflection.dartgetFieldfunction renamed togetAttribute
- Removed:
Undefinedtype andmissingobjectEnvironment.undefinedmethodTemplate.rendermethodFileSystemLoader:FileSystemLoader({path, autoReload})argumentsautoReloadfielddirectoryfield
- Slices and negative indexes
- Conditional and variable
extendsstatement variants - Choice, ignore missing and variable
includestatement variants
- Internal changes
-
0.4.0-dev.6801 Jan 2023 pre-releaseNothing published for this version
-
0.4.0-dev.6407 Dec 2022 pre-releaseNothing published for this version
-
0.4.0-dev.6304 Dec 2022 pre-releaseNothing published for this version
-
0.4.0-dev.5330 Oct 2022 pre-releaseNothing published for this version
-
0.4.0-dev.5112 Oct 2022 pre-releaseNothing published for this version
-
0.4.0-dev.4015 Jul 2022 pre-releaseNothing published for this version
-
0.4.0-dev.3127 Nov 2021 pre-releaseNothing published for this version
-
0.4.0-dev.3024 Nov 2021 pre-releaseNothing published for this version
-
0.4.0-dev.2429 Oct 2021 pre-releaseNothing published for this version
-
0.4.0-dev.1215 Aug 2021 pre-releaseNothing published for this version
-
0.4.0-dev.1113 Aug 2021 pre-releaseNothing published for this version
-
0.4.0-dev.1013 Aug 2021 pre-releaseNothing published for this version
-
0.3.424 Jun 2021Nothing published for this version
-
0.3.124 Mar 2021Nothing published for this version
-
0.3.006 Mar 2021Nothing published for this version
-
0.2.417 May 2020Nothing published for this version
-
0.2.315 Feb 2020Nothing published for this version
-
0.2.230 Jan 2020Nothing published for this version
-
0.2.114 Jan 2020Nothing published for this version
-
0.2.014 Jan 2020Nothing published for this version
-
0.1.226 Aug 2019Nothing published for this version
-
0.1.126 Aug 2019Nothing published for this version
-
0.1.026 Aug 2019Nothing published for this version
-
0.0.830 Mar 2019Nothing published for this version
-
0.0.8+130 Mar 2019Nothing published for this version
-
0.0.704 Feb 2019Nothing published for this version
-
0.0.7+127 Mar 2019Nothing published for this version
-
0.0.603 Feb 2019Nothing published for this version
-
0.0.502 Feb 2019Nothing published for this version
-
0.0.428 Jan 2019Nothing published for this version
-
0.0.217 Jan 2019Nothing published for this version
-
0.0.117 Jan 2019Nothing published for this version