toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (date != null)
        'date':
            "${date!.year.toString().padLeft(4, '0')}-${date!.month.toString().padLeft(2, '0')}-${date!.day.toString().padLeft(2, '0')}",
      if (dateTime != null) 'dateTime': dateTime!.toUtc().toIso8601String(),
      if (timeZone != null) 'timeZone': timeZone!,
    };