listIndexOf method
Implementation
int? listIndexOf(List<int> other, [int start = 0]) {
if (other.length + start > length) {
return null;
}
for (var i = start; i < length - other.length; i++) {
if (this[i] == other[0]) {
var found = true;
for (var j = 1; j < other.length; j++) {
if (this[i + j] != other[j]) {
found = false;
break;
}
}
if (found) {
return i;
}
}
}
return null;
}