zeroPad static method

Uint8List zeroPad(
  1. Uint8List data,
  2. int size
)

Implementation

static Uint8List zeroPad(Uint8List data, int size) {
  //assert(data.length <= size);
  if (data.length >= size) return data;
  return Uint8List(size)..setRange(size - data.length, size, data);
}