CheckouCartSummaryModel.fromJson constructor Null safety

CheckouCartSummaryModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CheckouCartSummaryModel.fromJson(Map<String, dynamic> json) =>
    CheckouCartSummaryModel(
      summary: json["summary"] == null
          ? null
          : List<Summary>.from(
              json["summary"].map((x) => Summary.fromJson(x))),
      couponInfo: json["couponInfo"] == null
          ? null
          : CouponInfo.fromJson(json["couponInfo"]),
      loyaltyPoints: json["loyaltyPoints"] == null
          ? null
          : LoyaltyPoints.fromJson(json["loyaltyPoints"]),
      configDeliveryPeriod: json["configDeliveryPeriod"] == null
          ? null
          : ConfigDeliveryPeriod.fromJson(json["configDeliveryPeriod"]),
      total: json["total"] == null ? null : json["total"]!.toDouble(),
    );