uInt8ListFrom32BitList property

Uint8List? uInt8ListFrom32BitList

Implementation

Uint8List? get uInt8ListFrom32BitList {
  if (T != int) {
    return null;
  }
  final List<int> bit32 = this as List<int>;
  final Uint8List result = Uint8List(bit32.length * 4);
  for (int i = 0; i < bit32.length; i++) {
    for (int j = 0; j < 4; j++) {
      result[i * 4 + j] = bit32[i] >> (j * 8);
    }
  }
  return result;
}