containsIndex method

bool containsIndex(
  1. int index
)

Returns true if index is within the range of elements in List.

Returns false if itself is Null.

indexListの要素の範囲内にある場合trueを返します。

自身がNullな場合はfalseを返します。

Implementation

bool containsIndex(int index) {
  if (this == null) {
    return false;
  }
  return index >= 0 && index < length;
}