OrderModel.fromJson constructor Null safety

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

Implementation

factory OrderModel.fromJson(Map<String, dynamic> json) => OrderModel(
      date: json["date"],
      id: json["id"],
      orderNo: json["orderNo"],
      productsCount: json["productsCount"],
      total: json["total"] == null ? null : json["total"]!.toDouble(),
      orderStatus: json["orderStatus"],
    );