class AttractionModel { int id; String name; String shortDescription; String description; String imagePath; String label; double lat; double lng; int rating; int review; int ranking; List images; AttractionModel( {this.id, this.name, this.shortDescription, this.description, this.imagePath, this.label, this.lat, this.lng, this.rating, this.review, this.ranking, this.images}); AttractionModel.fromJson(Map json) { id = json['id']; name = json['name']; shortDescription = json['shortDescription']; description = json['description']; imagePath = json['imagePath']; label = json['label']; lat = json['lat']; lng = json['lng']; rating = json['rating']; review = json['review']; ranking = json['ranking']; images = json['images'].cast(); } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['shortDescription'] = this.shortDescription; data['description'] = this.description; data['imagePath'] = this.imagePath; data['label'] = this.label; data['lat'] = this.lat; data['lng'] = this.lng; data['rating'] = this.rating; data['review'] = this.review; data['ranking'] = this.ranking; data['images'] = this.images; return data; } }