mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-29 14:58:44 +10:00
fix: simplify method call for writing data in UsbSerialService
This commit is contained in:
@@ -259,9 +259,7 @@ class UsbSerialService {
|
|||||||
}
|
}
|
||||||
if (_useAndroidUsbHost) {
|
if (_useAndroidUsbHost) {
|
||||||
try {
|
try {
|
||||||
await _androidMethodChannel.invokeMethod<void>('write', {
|
await _androidMethodChannel.invokeMethod<void>('write', {'data': data});
|
||||||
'data': data,
|
|
||||||
});
|
|
||||||
} on PlatformException catch (error) {
|
} on PlatformException catch (error) {
|
||||||
throw StateError(error.message ?? error.code);
|
throw StateError(error.message ?? error.code);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user