FhirDate.fromYaml constructor

FhirDate.fromYaml(
  1. dynamic yaml
)

Implementation

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