fillRange method

view source

void fillRange (int start, int end, [E? fill]) inherited

Implementation

void fillRange(int start, int end, [E? fill]) {
  // Hoist the case to fail eagerly if the user provides an invalid `null`
  // value (or omits it) when E is a non-nullable type.
  E value = fill as E;
  RangeError.checkValidRange(start, end, this.length);
  for (int i = start; i < end; i++) {
    this[i] = value;
  }
}