fix: simplify method call for writing data in UsbSerialService

This commit is contained in:
zjs81
2026-03-14 18:41:57 -07:00
parent 6dfb7a4b69
commit 60e8ee0130
+1 -3
View File
@@ -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);
} }