setLocationInImageResultEnabled method

Future<void> setLocationInImageResultEnabled(
  1. bool enabled
)

Enables or disables the inclusion of barcode location information within the image data result.

enabled: A boolean indicating whether to enable location in image result.

Example usage:

bool locationInImageResultEnabled = true;
_barkoder.setLocationInImageResultEnabled(locationInImageResultEnabled);
print('Location in image result enabled: $locationInImageResultEnabled');

Implementation

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

  return _methodChannel.invokeMethod(
      'setLocationInImageResultEnabled', enabled);
}