toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['company'] = company ?? "";
data['first_name'] = firstName ?? "";
data['last_name'] = lastName ?? "";
data['address_1'] = address1 ?? "";
data['address_2'] = address2 ?? "";
data['city'] = city ?? "";
data['state'] = state ?? "";
data['postcode'] = postcode ?? "";
data['country'] = country ?? "";
if (email != null) {
data['email'] = email ?? "";
}
if (phone != null) {
data['phone'] = phone ?? "";
}
return data;
}