toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.email != null) data['email'] = this.email;
  if (this.name != null) data['name'] = this.name;
  if (this.phone != null) data['phone'] = this.phone;
  if (this.address != null) {
    data['address'] = this.address!.toJson();
  }
  return data;
}