hasEmptyOrZeroQuantity method

bool hasEmptyOrZeroQuantity(
  1. FormGroup form
)

Implementation

bool hasEmptyOrZeroQuantity(FormGroup form) {
  final quantityDistributedArray =
      form.control(_quantityDistributedKey) as FormArray;

  // Check if any quantity is zero or null
  return quantityDistributedArray.value?.any((e) => e == 0 || e == null) ??
      true;
}