parameterize method

String? parameterize(
  1. String config,
  2. ConfigParams parameters

Parameterized configuration template given as string with dynamic parameters.

The method uses Handlebars template engine: Handlebars

  • config a string with configuration template to be parameterized
  • parameters dynamic parameters to inject into the template Return a parameterized configuration string.


String? parameterize(String config, ConfigParams parameters) {
  parameters = _parameters.override(parameters);
  var template = MustacheTemplate(config);
  return template.evaluateWithVariables(parameters);