ConfigEntry.fromYaml constructor

ConfigEntry.fromYaml(
  1. Map<String, dynamic> yaml
)

Implementation

factory ConfigEntry.fromYaml(Map<String, dynamic> yaml) {
  final type = yaml['type'] as String;

  return ConfigEntry(
    path: yaml['path'] as String,
    type: type,
    exclusions:
        (yaml['exclusions'] as List<dynamic>?)
            ?.map((e) => e.toString())
            .toList() ??
        [],
    recursive: yaml['recursive'] as bool? ?? false,
  );
}