toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (value != null) {
    json[r'value'] = value;
  }
  if (min != null) {
    json[r'min'] = min;
  }
  if (max != null) {
    json[r'max'] = max;
  }
  if (ref != null) {
    json[r'ref'] = ref;
  }
  if (severity != null) {
    json[r'severity'] = severity;
  }
  if (severityCode != null) {
    json[r'severityCode'] = severityCode;
  }
  if (evolution != null) {
    json[r'evolution'] = evolution;
  }
  if (unit != null) {
    json[r'unit'] = unit;
  }
  json[r'unitCodes'] = unitCodes.toList();
  if (comment != null) {
    json[r'comment'] = comment;
  }
  if (comparator != null) {
    json[r'comparator'] = comparator;
  }
  return json;
}