render method

String render(
  1. String template,
  2. Map<String, String> values, [
  3. List<ParserResult?>? results
])

Implementation

String render(String template, Map<String, String> values,
    [List<ParserResult?>? results]) {
  values = Map.from(values);
  if (results != null) {
    addResultsToTemplateValues(values, results);
  }

  for (final key in values.keys) {
    final value = values[key]!;
    template = template.replaceAll('{{$key}}', value);
  }

  return template;
}