toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final Map<String, dynamic> json = <String, dynamic>{};
  if (day != null) {
    json['day'] = day;
  }
  if (hour != null) {
    json['hour'] = hour;
  }
  if (millisecond != null) {
    json['millisecond'] = millisecond;
  }
  if (minute != null) {
    json['minute'] = minute;
  }
  if (month != null) {
    json['month'] = month;
  }
  if (second != null) {
    json['second'] = second;
  }
  if (week != null) {
    json['week'] = week;
  }
  if (year != null) {
    json['year'] = year;
  }
  return json;
}