process function

String process(
  1. String template, {
  2. Map<String, String>? parameters,
})

Implementation

String process(String template, {Map<String, String>? parameters}) {
  if (parameters != null) {
    String processed = template;
    parameters.forEach((key, value) {
      processed = processed.replaceAll(key, value);
    });
    return processed;
  } else {
    return template;
  }
}