selectAsBool method
Returns the boolean 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
bool? selectAsBool(String selector) {
final dynamic value = traverse(selector);
if (value is! bool) {
throw SettingsYamlException('Expected a bool at $selector. Found $value');
}
return value;
}