deleteSingleAsset method

Future<void> deleteSingleAsset(
  1. String assetId,
  2. ProductContentModel product
)

Implementation

Future<void> deleteSingleAsset(
    String assetId, ProductContentModel product) async {
  currentProduct = product;
  switch (currentScan) {
    case ScanType.collectStock:
      await callDeleteAssetByIdApi(assetId, null, null, false);
      break;
    case ScanType.sellThru:
      await callDeleteAssetByIdApi(assetId, null, null, false);
      break;
    case ScanType.spotSellThru:
      await callDeleteAssetByIdApi(assetId, null, null, false);
      break;
    case ScanType.grn:
      await deleteAssetGrn(assetId, product);
      break;
    default:
      title = "collectStock";
      break;
  }
}