write static method
write will write characteristic value and returns error if something is wrong wrap in try catch to capture error
Implementation
static Future<void> write(
{required String address,
required String service,
required String characteristic,
required Uint8List data,
required bool writeWithResponse}) async {
await _channel.invokeMethod("write", args: {
"device": WinHelper.getDeviceFromAddress(address),
"service": WinHelper.toWindowsUuid(service),
"characteristic": WinHelper.toWindowsUuid(characteristic),
"value": data,
"writeWithResponse": writeWithResponse
});
}