toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (formatted_address != null) {
data['formatted_address'] = formatted_address;
}
if (geometry != null) {
data['geometry'] = geometry?.toJson();
}
if (place_id != null) {
data['place_id'] = place_id;
}
if (address_components != null) {
data['address_components'] = address_components?.map((e) => e.toJson()).toList();
}
return data;
}