toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['neighborhood'] = neighborhood;
data['postcode'] = postcode;
data['building'] = building;
data['province'] = province;
data['level'] = level;
data['formattedAddress'] = formattedAddress;
if (location != null) {
data['location'] = location!.toJson();
}
data['city'] = city;
data['citycode'] = citycode;
data['district'] = district;
data['adcode'] = adcode;
data['township'] = township;
data['country'] = country;
return data;
}