toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
  if (active != null) 'active': active!,
  if (every != null) 'every': every!,
  if (expirationDate != null)
    'expirationDate':
        "${expirationDate!.year.toString().padLeft(4, '0')}-${expirationDate!.month.toString().padLeft(2, '0')}-${expirationDate!.day.toString().padLeft(2, '0')}",
  if (repeats != null) 'repeats': repeats!,
  if (repeatsOnWeekDays != null) 'repeatsOnWeekDays': repeatsOnWeekDays!,
  if (runsOnDayOfMonth != null) 'runsOnDayOfMonth': runsOnDayOfMonth!,
  if (startDate != null)
    'startDate':
        "${startDate!.year.toString().padLeft(4, '0')}-${startDate!.month.toString().padLeft(2, '0')}-${startDate!.day.toString().padLeft(2, '0')}",
  if (timezone != null) 'timezone': timezone!,
};