setDecodingSpeed method

Future<void> setDecodingSpeed(
  1. DecodingSpeed decodingSpeed
)

Sets the decoding speed for barcode scanning.

decodingSpeed: The DecodingSpeed to set.

Example usage:

DecodingSpeed speed = DecodingSpeed.fast;
_barkoder.setDecodingSpeed(speed);
print('Decoding speed set to: $speed');

Implementation

Future<void> setDecodingSpeed(DecodingSpeed decodingSpeed) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod('setDecodingSpeed', decodingSpeed.index);
}