lookup method
Returns a string specified by key from the loaded yaml file.
By passing parameters to namedParameters,
formatting compliant with MessageFormat is possible.
This method is called from the l method.
Implementation
String lookup(String key, {Map<String, Object>? namedParameters}) {
final tValue = _map[key];
if (tValue == null) {
return key;
}
if (tValue is MessageFormat) {
return tValue.format(namedParameters ?? const {});
} else {
return tValue.toString();
}
}