convertVariable method

MapEntry convertVariable(
  1. dynamic key,
  2. dynamic value
)

Implementation

MapEntry convertVariable(key, value) {
  var match = RegExp(r'\$\{(.*)\}').firstMatch(value.toString());
  if (match != null) {
    var value2 = variableMap[match.group(1)];
    return MapEntry(key, value2);
  }
  return MapEntry(key, value);
}