FhirDateTime.fromYaml constructor

FhirDateTime.fromYaml(
  1. dynamic yaml
)

Implementation

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