yamlToMap function
Converts the given yaml
to a Map.
Implementation
Map<String, dynamic> yamlToMap(YamlMap yaml) {
try {
final jsonString = jsonEncode(yaml);
return jsonDecode(jsonString);
} catch (_) {
throw TellUser((tell) =>
tell(red('The YAML file contains features that are not supported by the JSON format.')));
}
}