selectAsMap method

Map<String, dynamic>? selectAsMap(
  1. String selector
)

Returns the map 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

Map<String, dynamic>? selectAsMap(String selector) {
  final dynamic map = traverse(selector);
  if (map is! YamlMap) {
    throw SettingsYamlException('Expected a map at $selector. Found $map');
  }
  return map.toMap();
}