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