Skip to content
pubscout

simple_mustache

2.1.0, released 5 years ago by nfet.net

Dart implementation of a mustache subset for simple String templates with filters.

WASM-ready
$ flutter pub add simple_mustache
Source repository

What it does

It implements a subset of the mustache specification for Dart to process simple string templates. It supports filters and implements the dart:convert specification.

AI-written summary of version 2.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need basic mustache string templating in your Dart application
  • You want to render templates using the dart:convert pattern

Skip it when

  • You need full mustache specification support with all advanced features
  • You require complex logic beyond simple variable substitution and filters

Strengths

  • Implements dart:convert specification
  • Lightweight with minimal dependencies

Weaknesses

  • Only implements a subset of mustache templates
  • Limited documentation beyond basic usage

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
final m = Mustache(map: {'name': 'David'});
final output = m.convert('Hello, my name is {{ name }}.');

Alternatives

Packages that do the same job and could replace simple_mustache.

Works with

Packages commonly used together with simple_mustache: ones it builds on, ones built on it, and its own family.