writeData method
Implementation
@override
Future<void> writeData(Uint8List? data) async {
try {
return await bltMethodChannel.invokeMethod('writeData', {'data': data});
} on PlatformException catch (e) {
if (e.code == 'BluetoothException') {
throw BluetoothException(e.message);
}
throw Exception(e.message);
}
}