getDataWithPrefix method

Stream<Uint8List> getDataWithPrefix(
  1. int prefix
)

Gets data of a specific type from the device.

Implementation

Stream<Uint8List> getDataWithPrefix(int prefix) {
  return dataResponse
      .where((event) => event[0] == prefix)
      .map((event) => Uint8List.fromList(event.sublist(1)));
}