toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'list': list.id,
      'id': id,
      'title': title,
      'dueDate': dueDate == null
          ? null
          : {
              'year': dueDate?.year,
              'month': dueDate?.month,
              'day': dueDate?.day,
              'hour': dueDate?.hour,
              'minute': dueDate?.minute,
              'second': dueDate?.second,
            },
      'priority': priority,
      'isCompleted': isCompleted,
      'notes': notes
    };