Length constructor
Constructs a new Length with optional value, unit, system, and code.
Implementation
Length({
num? value,
String? unit,
Uri? system,
String? code,
}) : this.fromJson(
JsonObject({
if (value != null) valueField.name: JsonNumber(value),
if (unit != null) unitField.name: JsonString(unit),
if (system != null) systemField.name: JsonString(system.toString()),
if (code != null) codeField.name: JsonString(code),
}),
);