toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['formatted_address'] = formattedAddress;
  if (geometry != null) {
    data['geometry'] = geometry!.toJson();
  }
  data['name'] = name;
  data['rating'] = rating;
  data['user_ratings_total'] = userRatingsTotal;
  return data;
}