SavedToursModel.fromJson constructor

SavedToursModel.fromJson(
  1. Map<String, dynamic> json
)

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'],
  );
}