Returns true if index is within the range of elements in List.
true
index
indexがListの要素の範囲内にある場合trueを返します。
bool containsIndex(int index) { return index >= 0 && index < length; }