Currently, I am trying to read a file byte by byte and add some specific values to a list of 8-bit bytes (which might be of type List<Uint8>
). To read the file one byte at a time, I am using RandomAccessFile.readByte()
, but it returns an int
value which is not accepted by List<Uint8>.add()
function.
Due to the function name and return type, it looks like RandomAccessFile.readByte()
provides a single byte in 64 bits. So what is the proper way to get only the least significant byte of the 64 bit result and add it to _someUint8List
considering different types of endianness?
Lastly, This page mentions Uint8 being a marker in Dart, but I am not sure what is meant by that. Thanks in advance.