FhirInteger.fromYaml constructor

FhirInteger.fromYaml(
  1. dynamic yaml
)

Implementation

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