toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "qty": qty,
      "id": id,
      "productID": productId,
      "productCode": productCode,
      "imageUrl": imageUrl,
      "imageThumbUrl": imageThumbUrl,
      "title": title,
      "seoTitle": seoTitle,
      "isOutOfStock": isOutOfStock,
      "price": price,
      "finalPrice": finalPrice,
      "hasDiscount": hasDiscount,
      "discountValue": discountValue,
      "discountType": discountType,
      "promoText": promoText,
      "bogoPromoText": bogoPromoText,
      "croppedImageURL": croppedImageUrl,
      "enableCropping": enableCropping,
      "size": size,
      "sizeID": sizeId,
      "colorHexaCode": colorHexaCode,
      "color": color,
      "colorID": colorId,
    };