FindPlaceResponse.fromJson constructor

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

Implementation

factory FindPlaceResponse.fromJson(Map<String, dynamic> json) {
  return FindPlaceResponse(
    status: json['status'],
    htmlAttributions: json['html_attributions'] != null
        ? (json['html_attributions'] as List<dynamic>).cast<String>()
        : null,
    nextPageToken: json['next_page_token'],
    debugLog: json['debug_log'] != null
        ? DebugLog.fromJson(json['debug_log'])
        : null,
    candidates: json['candidates'] != null
        ? json['candidates']
            .map<SearchCandidate>((json) => SearchCandidate.fromJson(json))
            .toList()
        : null,
  );
}