toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "id": id,
      "name": name,
      "description": description,
      "imageURL": imageUrl,
      "videoURL": videoUrl,
      "thumbImageURL": thumbImageUrl,
      "listType": listType,
      "product": product == null ? null : product!.toJson(),
      "itemSource": itemSource,
      "hasFilter": hasFilter,
    };