RenderTemplate extension

Given a String with mustache templates, and a Map of String key / value pairs, substitute all instances of {{key}} for value.

Hello {{name}}!

and

{'name': 'Bob'}

becomes:

Hello Bob!
on

Methods

render(Map<String, dynamic> vars, [Map<String, List<int>>? partials = const {}]) String
Given a String with mustache templates, and a Map of String key / value pairs, substitute all instances of {{key}} for value.