toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'consignee_name': consigneeName,
'consignee_mobile': consigneeMobile,
'consignee_address': consigneeAddress,
'province_id': provinceId,
'city_id': cityId,
'county_id': countyId,
if (townId != null) 'town_id': townId,
if (consigneeZip != null) 'consignee_zip': consigneeZip,
if (cpin != null) 'cpin': cpin,
if (remark != null) 'remark': remark,
'items': items.map((item) => item.toJson()).toList(),
};
}