toUInt8List method

Uint8List toUInt8List()

Implementation

Uint8List toUInt8List() {
  trim();
  BytesBuilder bb = BytesBuilder();
  for (int i = 0; i < getSize(); i += 8) {
    bb.addByte(getBits(i, min(8, getSize() - i)));
  }

  return bb.toBytes();
}