ImagingSelectionPerformer.fromYaml constructor
ImagingSelectionPerformer.fromYaml(
- dynamic yaml
Factory constructor that accepts a String in YAML format as an argument
Implementation
factory ImagingSelectionPerformer.fromYaml(dynamic yaml) => yaml is String
? ImagingSelectionPerformer.fromJson(
jsonDecode(jsonEncode(loadYaml(yaml))) as Map<String, dynamic>)
: yaml is YamlMap
? ImagingSelectionPerformer.fromJson(
jsonDecode(jsonEncode(yaml)) as Map<String, dynamic>)
: throw ArgumentError(
'ImagingSelectionPerformer cannot be constructed from input provided,'
' it is neither a yaml string nor a yaml map.');