Replaces the contents with bytes, growing storage if it must.
bytes
void assign(List<int> bytes) { final n = bytes.length; if (n > storage.length) storage = Uint8List(n); storage.setRange(0, n, bytes); length = n; }