ensureCapacity method

void ensureCapacity(
  1. int n
)

Grows storage to hold at least n elements, keeping the first length.

Implementation

void ensureCapacity(int n) {
  if (n <= storage.length) return;
  storage = Int64List(n)..setRange(0, length, storage);
}