FhirBase64Binary.fromYaml constructor

FhirBase64Binary.fromYaml(
  1. dynamic yaml
)

Implementation

factory FhirBase64Binary.fromYaml(dynamic yaml) => yaml is String
    ? FhirBase64Binary.fromJson(jsonDecode(jsonEncode(loadYaml(yaml))))
    : yaml is YamlMap
        ? FhirBase64Binary.fromJson(jsonDecode(jsonEncode(yaml)))
        : throw YamlFormatException<FhirBase64Binary>(
            'FormatException: "$json" is not a valid Yaml string or YamlMap.');