ensure method

void ensure(
  1. int length
)
override

Implementation

void ensure(int length) {
  if (length <= _maxCols) {
    return;
  }

  final nextLength = _nextLength(length);
  final newCells = ByteData(nextLength * _cellSize);
  newCells.buffer.asInt64List().setAll(0, _cells.buffer.asInt64List());
  _cells = newCells;
  _maxCols = nextLength;
}