toPostJson method
Converts the body data model to a JSON object for a POST request.
This method should be implemented by subclasses to convert their specific data to a JSON object. It should only include properties that need to be sent in a POST request.
Implementation
@override
Map<String, dynamic>? toPostJson() {
Map<String, dynamic> data = <String, dynamic>{};
data["country"] = country;
data["state"] = state;
data["city"] = city;
data["district"] = district;
data["neighborhood"] = neighborhood;
data["street"] = street;
data["buildingNo"] = buildingNo;
data["doorNo"] = doorNo;
data["zipCode"] = zipCode;
data["latitude"] = latitude;
data["longitude"] = longitude;
data["openAddress"] = openAddress;
data["id"] = id;
return data;
}