If YAML anchors or aliases are introduced to a .yaml file, they won't be parsed when using the loadYaml method. Instead, null will be displayed.
Example:
import 'package:yaml/yaml.dart';
void main() {
// YAML with an anchor and an alias
const yamlText = '''
enums:
- &ServerEnvironment
name: ServerEnvironment
description: "Test enum"
methods:
- name: initialise
fields:
- name: environment
type: *ServerEnvironment
''';
// Parse YAML
final doc = loadYaml(yamlText);
// Access alias
final typeField = doc['methods'][0]['fields'][0]['type'];
print('typeField: $typeField'); // Expected: full map of enum, Actual: null
}