toJson method

Map<String, dynamic> toJson()

Implementation

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