hasNullElements static method

bool hasNullElements(
  1. List<Object?> array
)

Returns true if the array contains any null elements.

@param array an array to validate @return true if any of arrays elements are null

Implementation

static bool hasNullElements(List<Object?> array) {
  for (int i = 0; i < array.length; i++) {
    if (array[i] == null) {
      return true;
    }
  }
  return false;
}