This is flutter sqlite local notification project. User can add task.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

2 years ago
  1. class TaskModel {
  2. int? id;
  3. String? title;
  4. String? note;
  5. int? isCompleted;
  6. String? date;
  7. String? startTime;
  8. String? endTime;
  9. int? color;
  10. int? remind;
  11. String? repeat;
  12. TaskModel({
  13. this.id,
  14. this.title,
  15. this.note,
  16. this.isCompleted,
  17. this.date,
  18. this.startTime,
  19. this.endTime,
  20. this.color,
  21. this.remind,
  22. this.repeat,
  23. });
  24. TaskModel.fromJson(Map<String, dynamic> json) {
  25. id = json['id'];
  26. title = json['title'];
  27. note = json['note'];
  28. isCompleted = json['isCompleted'];
  29. date = json['date'];
  30. startTime = json['startTime'];
  31. endTime = json['endTime'];
  32. color = json['color'];
  33. remind = json['remind'];
  34. repeat = json['repeat'];
  35. }
  36. Map<String, dynamic> toJson() {
  37. final Map<String, dynamic> data = <String, dynamic>{};
  38. data['id'] = id;
  39. data['title'] = title;
  40. data['note'] = note;
  41. data['isCompleted'] = isCompleted;
  42. data['date'] = date;
  43. data['startTime'] = startTime;
  44. data['endTime'] = endTime;
  45. data['color'] = color;
  46. data['remind'] = remind;
  47. data['repeat'] = repeat;
  48. return data;
  49. }
  50. }