padLeftUint8List function

Uint8List padLeftUint8List(
  1. Uint8List data, [
  2. int len = 32
])

Implementation

Uint8List padLeftUint8List(Uint8List data, [int len = 32]) {
  assert(data.length <= len);
  if (data.length == len) return data;

  return Uint8List(len)..setRange(len - data.length, len, data);
}