toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => {
    "id": id,
    "product_name": productName,
    "product_image": productImage,
    "product_code": productCode,
    "product_barcode": productBarcode,
    "combination_name": combinationName,
    "price": price,
    "qty": qty,
    "vat": vat,
    "vat_exempted": vatExempted,
    "supplier_price": supplierPrice,
    "margin": margin,
    "is_subscription": isSubscription,
    "item_variants": itemVariants == null ? [] : List<dynamic>.from(itemVariants!.map((x) => x.toMap())),
    "thumbnail": thumbnail,
    "medium": medium,
};