setBeepOnSuccessEnabled method
- bool enabled
Enables or disables the audible beep sound upon successfully decoding a barcode.
enabled
: A boolean indicating whether to enable beep on success.
Example usage:
bool beepOnSuccessEnabled = true;
await _barkoder.setBeepOnSuccessEnabled(beepOnSuccessEnabled);
print('Beep on success enabled: $beepOnSuccessEnabled');
Implementation
Future<void> setBeepOnSuccessEnabled(bool enabled) {
if (_isBarkoderViewNotMounted) {
return Future.error(PlatformException(
code: BarkoderErrors.barkoderViewNotMounted,
message: BarkoderErrors.barkodeViewNotMountedDesc));
}
return _methodChannel.invokeMethod('setBeepOnSuccessEnabled', enabled);
}