setRegionOfInterestVisible method

Future<void> setRegionOfInterestVisible(
  1. bool visible
)

Sets the visibility of the Region of Interest (ROI) on the camera preview.

visible: A boolean indicating whether to make the ROI visible.

Example usage:

bool roiVisible = true;
await _barkoder.setRegionOfInterestVisible(roiVisible);
print('Region of interest set to visible: $roiVisible');

Implementation

Future<void> setRegionOfInterestVisible(bool visible) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod('setRegionOfInterestVisible', visible);
}