DatePair.fromJson(Map<String, dynamic> json){ this.from = DateTime.parse(json['from']); this.to = DateTime.parse(json['to']); this.name = json['name']; this.id = json['id']; }