loadYamlAsMap static method
Load a YAML string as a native (Dart) map. Returns an empty map if the YAML is invalid.
Implementation
static Map<String, dynamic> loadYamlAsMap(String contents) {
final map = loadYaml(contents);
if (map is YamlMap) {
return yamlMapToMap(map);
}
return {};
}