writeData method

  1. @override
Future<void> writeData(
  1. Uint8List? data
)
override

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);
  }
}