getProductId method

String getProductId(
  1. String? offerId
)

Implementation

String getProductId(String? offerId) {
  if (offerId == null) {
    return "";
  }
  String productId = "";
  for (final data in selectedProduct) {
    if (data.id?.toString() == offerId) {
      productId = data.productId ?? "";
      break;
    }
  }
  return productId;
}