eval method
Evaluate (substitute) str
with provided values
.
If keepAlive
is set to true
, it'll leave all placeholders
intact if the value is not found inside values
.
Or else, it'll be substituted with '' (empty String)
Implementation
String eval(String str, Map values, [bool keepAlive = false]) {
if (_paramRegex.hasMatch(str)) {
var missingMatchSet = _getMatchSet(str);
var cache = _flattenAndResolve(values, missingMatchSet, null, keepAlive);
str = _getInterpolated(str, cache, keepAlive);
}
return str;
}