setRoiOverlayBackgroundColor method

Future<void> setRoiOverlayBackgroundColor(
  1. String hexColor
)

Sets the background color of the overlay within the Region of Interest (ROI) for barcode scanning on the camera feed.

hexColor: The color to set for the ROI overlay background in hexadecimal format.

Example usage:

String backgroundColor = '#FFA500'; // Orange color
_barkoder.setRoiOverlayBackgroundColor(backgroundColor);
print('ROI overlay background color set to: $backgroundColor');

Implementation

Future<void> setRoiOverlayBackgroundColor(String hexColor) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod(
      'setRoiOverlayBackgroundColor', hexColor);
}