SavedToursModel.fromJson constructor
Returns a SavedToursModel from the given json
.
Implementation
factory SavedToursModel.fromJson(Map<String, dynamic> json) {
return SavedToursModel(
query: json['query'],
places: List<PlacesModel>.from(
json['places']?.map((place) => PlacesModel.fromJson(place)),
),
country: json['country'],
city: json['city'],
isGenerated: json['isGenerated'],
);
}