create static method
DeliveryData
create({
- String special_type = "deliveryData",
- String? id,
- SenderData? sender,
- ReceiverData? receiver,
- String? service,
- int? weight,
- String? platform,
- String? send_date,
- int? real_price,
- int? total_price,
- List<
TrackHistoryData> ? track_history,
override
return original data json
Implementation
static DeliveryData create({
String special_type = "deliveryData",
String? id,
SenderData? sender,
ReceiverData? receiver,
String? service,
int? weight,
String? platform,
String? send_date,
int? real_price,
int? total_price,
List<TrackHistoryData>? track_history,
}) {
// DeliveryData deliveryData = DeliveryData({
DeliveryData deliveryData_data_create = DeliveryData({
"@type": special_type,
"id": id,
"sender": (sender != null) ? sender.toJson() : null,
"receiver": (receiver != null) ? receiver.toJson() : null,
"service": service,
"weight": weight,
"platform": platform,
"send_date": send_date,
"real_price": real_price,
"total_price": total_price,
"track_history": (track_history != null) ? track_history.toJson() : null,
});
// return deliveryData;
return deliveryData_data_create;
}