selectAsList method

List? selectAsList(
  1. String selector
)

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

List<dynamic>? selectAsList(String selector) {
  final dynamic list = traverse(selector);
  if (list is! YamlList) {
    throw SettingsYamlException('Expected a list at $selector. Found $list');
  }
  return list.toList();
}