Uint8List padToSize(int size) { if (length >= size) { return this; } final buffer = Uint8List(size); buffer.writeSlice(size - length, this); return buffer; }