excludeByIndex method

List<T> excludeByIndex(
  1. Iterable<int> indexes
)

Returns a sublist containing every element in this list, excluding those at the defined indexes.

Implementation

List<T> excludeByIndex(Iterable<int> indexes) {
  final elements = <T>[];
  for (var i = 0; i < length; i++) {
    if (!indexes.contains(i)) elements.add(elementAt(i));
  }
  return elements;
}