readUint8 method

Future<int?> readUint8()

Like readBytes, but reads a single Uint8 and returns it as int.

Implementation

Future<int?> readUint8() async {
  final bytes = await readBytes(1);
  return (bytes != null) ? bytes[0] : null;
}