hasRepeated<T> static method
CHecks if there are subsequent repeating items.
Implementation
static bool hasRepeated<T>(List<T> list) {
for (var i = 1; i < list.length; i++) {
if (list[i - 1] == list[i]) {
return true;
}
}
return false;
}