class SubLocationsResponse { List? subLocations; String? error; String? message; SubLocationsResponse({this.subLocations, this.error, this.message}); SubLocationsResponse.fromJson(Map json) { if (json['sub_locations'] != null) { subLocations = []; json['sub_locations'].forEach((v) { subLocations!.add(SubLocations.fromJson(v)); }); } error = json['error']; message = json['message']; } Map toJson() { final Map data = {}; if (subLocations != null) { data['sub_locations'] = subLocations!.map((v) => v.toJson()).toList(); } data['error'] = error; data['message'] = message; return data; } } class SubLocations { String? id; String? districtId; String? subLocality; String? date; String? isExists; String? createdDatetime; String? updatedDatetime; SubLocations({ this.id, this.districtId, this.subLocality, this.date, this.isExists, this.createdDatetime, this.updatedDatetime, }); SubLocations.fromJson(Map json) { id = json['id']; districtId = json['district_id']; subLocality = json['sub_locality']; date = json['date']; isExists = json['is_exists']; createdDatetime = json['created_datetime']; updatedDatetime = json['updated_datetime']; } Map toJson() { final Map data = {}; data['id'] = id; data['district_id'] = districtId; data['sub_locality'] = subLocality; data['date'] = date; data['is_exists'] = isExists; data['created_datetime'] = createdDatetime; data['updated_datetime'] = updatedDatetime; return data; } }