sendHex method

  1. @override
Future<void> sendHex(
  1. String hexString
)
override

Send hex data

Implementation

@override
Future<void> sendHex(String hexString) async {
  try {
    final data = TextUtils.fromHexString(hexString);
    final dataWithNewline = Uint8List.fromList([...data, ..._newlineType.codeUnits]);
    await sendData(dataWithNewline);
  } catch (e) {
    throw BluetoothException('Invalid hex string: $e');
  }
}