ensureCapacity method

void ensureCapacity(
  1. int n
)

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

Implementation

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