FhirBoolean.fromYaml constructor

FhirBoolean.fromYaml(
  1. dynamic yaml
)

Implementation

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