class SpecialServiceModel { int? id; String? name; String? description; double? price; int? specialServiceType; String? specialServiceTypeName; bool? isActive; String? startDate; String? endDate; List
? details; List? office; bool? isDelivery; bool? isSelected; SpecialServiceModel( {this.id, this.name, this.description, this.price, this.specialServiceType, this.specialServiceTypeName, this.isActive, this.startDate, this.endDate, this.details, this.office, this.isSelected, this.isDelivery}); SpecialServiceModel.fromJson(Map json) { id = json['id']; name = json['name']; description = json['description']; price = json['price']; specialServiceType = json['specialServiceType']; specialServiceTypeName = json['specialServiceTypeName']; isActive = json['isActive']; startDate = json['startDate']; endDate = json['endDate']; if (json['details'] != null) { details =
[]; json['details'].forEach((v) { details!.add(Details.fromJson(v)); }); } if (json['office'] != null) { office = []; json['office'].forEach((v) { office!.add(Office.fromJson(v)); }); } isDelivery = json['isDelivery']; isSelected = false; } Map toJson() { final Map data = {}; data['id'] = id; data['name'] = name; data['description'] = description; data['price'] = price; data['specialServiceType'] = specialServiceType; data['specialServiceTypeName'] = specialServiceTypeName; data['isActive'] = isActive; data['startDate'] = startDate; data['endDate'] = endDate; if (details != null) { data['details'] = details!.map((v) => v.toJson()).toList(); } if (office != null) { data['office'] = office!.map((v) => v.toJson()).toList(); } data['isDelivery'] = isDelivery; return data; } } class Details { int? id; int? specialServiceID; int? fromcity; int? tocity; int? price; Details( {this.id, this.specialServiceID, this.fromcity, this.tocity, this.price}); Details.fromJson(Map json) { id = json['id']; specialServiceID = json['specialServiceID']; fromcity = json['fromcity']; tocity = json['tocity']; price = json['price']; } Map toJson() { final Map data = {}; data['id'] = id; data['specialServiceID'] = specialServiceID; data['fromcity'] = fromcity; data['tocity'] = tocity; data['price'] = price; return data; } } class Office { int? id; String? officeAreaName; String? officeAreaNameN; int? cityID; String? city; int? specialServiceID; Office( {this.id, this.officeAreaName, this.officeAreaNameN, this.cityID, this.city, this.specialServiceID}); Office.fromJson(Map json) { id = json['id']; officeAreaName = json['officeAreaName']; officeAreaNameN = json['officeAreaNameN']; cityID = json['cityID']; city = json['city']; specialServiceID = json['specialServiceID']; } Map toJson() { final Map data = {}; data['id'] = id; data['officeAreaName'] = officeAreaName; data['officeAreaNameN'] = officeAreaNameN; data['cityID'] = cityID; data['city'] = city; data['specialServiceID'] = specialServiceID; return data; } }