sendCommandBundle method
- @Deprecated('This is for backwards compatibility and only support Zebra devices, this will be removed later')
Future<bool>
sendCommandBundle(
{ - required String command,
- required Map<String, dynamic> parameter,
- required bool sendResult,
})
Implementation
@Deprecated('This is for backwards compatibility and only support Zebra devices, this will be removed later')
Future<bool> sendCommandBundle({required String command, required Map<String, dynamic> parameter, required bool sendResult}) async {
if (!isDeviceSupported) return false;
debugPrint('sendCommandBundle-$isDeviceSupported');
if (sendResult) completerSendCommandBundle = Completer();
final invoked = await _methodChannel.invokeMethod<bool>('sendCommandBundle', {'command': command, 'parameter': parameter, 'sendResult': sendResult});
if (invoked == true && sendResult) {
_lastCompleterError = await completerSendCommandBundle!.future;
log('sendCommandBundle: $_lastCompleterError');
return _lastCompleterError == 'OK';
}
return invoked == true;
}