setZoomFactor method

Future<void> setZoomFactor(
  1. double zoomFactor
)

Sets the zoom factor for the device's camera, adjusting the level of zoom during barcode scanning.

zoomFactor: The zoom factor to set.

Example usage:

double zoom = 2.0;
await setZoomFactor(zoom);
print('Zoom factor set to: $zoom');

Implementation

Future<void> setZoomFactor(double zoomFactor) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod('setZoomFactor', zoomFactor);
}