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 = Float64List(n)..setRange(0, length, _storage);
}