setLocationInPreviewEnabled method
- bool enabled
Enables or disables the display of barcode location information on the camera preview.
enabled
: A boolean indicating whether to enable location in preview.
Example usage:
bool locationInPreviewEnabled = true;
_barkoder.setLocationInPreviewEnabled(locationInPreviewEnabled);
print('Location in preview enabled: $locationInPreviewEnabled');
Implementation
Future<void> setLocationInPreviewEnabled(bool enabled) {
if (_isBarkoderViewNotMounted) {
return Future.error(PlatformException(
code: BarkoderErrors.barkoderViewNotMounted,
message: BarkoderErrors.barkodeViewNotMountedDesc));
}
return _methodChannel.invokeMethod('setLocationInPreviewEnabled', enabled);
}