create static method

DeliveryData create({
  1. String special_type = "deliveryData",
  2. String? id,
  3. SenderData? sender,
  4. ReceiverData? receiver,
  5. String? service,
  6. int? weight,
  7. String? platform,
  8. String? send_date,
  9. int? real_price,
  10. int? total_price,
  11. 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;
}