toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (fieldId != null) 'fieldId': fieldId!,
      if (kind != null) 'kind': kind!,
      if (setDateValues != null)
        'setDateValues': setDateValues!
            .map((value) =>
                "${value.year.toString().padLeft(4, '0')}-${value.month.toString().padLeft(2, '0')}-${value.day.toString().padLeft(2, '0')}")
            .toList(),
      if (setIntegerValues != null) 'setIntegerValues': setIntegerValues!,
      if (setSelectionValues != null)
        'setSelectionValues': setSelectionValues!,
      if (setTextValues != null) 'setTextValues': setTextValues!,
      if (setUserValues != null) 'setUserValues': setUserValues!,
      if (unsetValues != null) 'unsetValues': unsetValues!,
    };