selectAsString method
Returns the String attribute at selector
See traverse for details on the syntax of selector
Throws a SettingsYamlException if
an error occurs reading the selector
Throws a PathNotFoundException exception
If the selector doesn't lead to a valid
location.
Implementation
String? selectAsString(String selector) {
final dynamic value = traverse(selector);
if (value is! String) {
throw SettingsYamlException(
'Expected a String at $selector. Found $value');
}
return value;
}