Reminder.fromJson constructor

Reminder.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Reminder.fromJson(Map<String, dynamic> json)
    : list = RemList.fromJson(json['list']),
      id = json['id'],
      title = json['title'],
      priority = json['priority'],
      isCompleted = json['isCompleted'],
      notes = json['notes'] {
  if (json['dueDate'] != null) {
    final date = json['dueDate'];
    dueDate = DateTime(date['year']!, date['month']!, date['day']!,
        date['hour'] ?? 00, date['minute'] ?? 00, date['second'] ?? 00);
  }
}