CartSummaryModel.fromJson constructor Null safety

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

Implementation

factory CartSummaryModel.fromJson(Map<String, dynamic> json) =>
    CartSummaryModel(
      items: json["items"] == null
          ? null
          : List<CartItemModel>.from(
              json["items"].map((x) => CartItemModel.fromJson(x))),
      summary: json["summary"] == null
          ? null
          : List<Summary>.from(
              json["summary"].map((x) => Summary.fromJson(x))),
      configDeliveryPeriod: json["configDeliveryPeriod"] == null
          ? null
          : ConfigDeliveryPeriod.fromJson(json["configDeliveryPeriod"]),
      enablePickAtStore: json["enablePickAtStore"],
    );