PlacesResponse.fromJson constructor

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

Implementation

factory PlacesResponse.fromJson(Map<String, dynamic> json) {
  return PlacesResponse(
    predictions: json["predictions"] == null
        ? []
        : List<Prediction>.from(
            json["predictions"]!.map((x) => Prediction.fromJson(x)),
          ),
    status: json["status"],
  );
}