toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> map = {
    "userId": userId,
    "deviceId": deviceId,
    "id": id,
    "bootHour": bootHour,
    "bootMinute": bootMinute,
    "scheduleEnable": scheduleEnable,
    "repeat": repeat,
    "day1": day1,
    "day2": day2,
    "day3": day3,
    "day4": day4,
    "day5": day5,
    "day6": day6,
    "day0": day0,
  };
  map.removeWhere((key, value) => value == null);
  return map;
}