Barcode Selection

Defined in library scandit_datacapture_barcode_selection

BarcodeSelection
class BarcodeSelection : DataCaptureMode

Added in version 6.10.0

Data capture mode that implements barcode selection.

Learn more on how to use Barcode Selection in our Get Started guide.

This capture mode uses the barcode scanning and tracking capabilities. It cannot be used together with other capture modes that require the same capabilities, e.g. BarcodeCapture.

BarcodeSelection.forContext(context, settings)
BarcodeSelection.forContext(DataCaptureContext context,
        BarcodeSelectionSettings settings)

Added in version 6.10.0

Constructs a new barcode selection mode with the provided context and settings.

isEnabled
bool isEnabled

Added in version 6.10.0

Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.

feedback
BarcodeSelectionFeedback feedback

Added in version 6.10.0

Instance of BarcodeSelectionFeedback that is used by barcode selection to notify users about the selection of a barcode.

The default instance of the Feedback will have the sound enabled but no vibration. A default click tone will be used for the sound.

To change the feedback emitted, the BarcodeSelectionFeedback can be modified as shown below, or a new one can be assigned.

var barcodeSelection = ...;
barcodeSelection.feedback.selection = Feedback(null, Sound.defaultSound);
context
DataCaptureContext? get context

Added in version 6.10.0

Implemented from DataCaptureMode. See DataCaptureMode.context.

pointOfInterest
PointWithUnit? pointOfInterest

Added in version 6.10.0

The point of interest overwriting the point of interest of the data capture view. By default, this overwriting point of interest is not set and the one from the data capture view is used.

applySettings(settings)
Future<void> applySettings(BarcodeSelectionSettings settings)

Added in version 6.10.0

Asynchronously applies the new settings to the barcode selection. If the barcode selection is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the barcode selection is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

recommendedCameraSettings
static CameraSettings get recommendedCameraSettings

Added in version 6.10.0

Returns the recommended camera settings for use with barcode selection.

addListener(listener)
void addListener(BarcodeSelectionListener listener)

Added in version 6.10.0

Adds the listener to this barcode selection instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

addAdvancedListener(listener)
void addAdvancedListener(BarcodeSelectionAdvancedListener listener)

Added in version 6.14.0

Adds the advanced listener to this barcode selection instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

removeListener(listener)
void removeListener(BarcodeSelectionListener listener)

Added in version 6.10.0

Removes a previously added listener from this barcode selection instance.

In case the listener is not currently observing this instance, calling this method has no effect.

removeAdvancedListener(listener)
void removeAdvancedListener(BarcodeSelectionAdvancedListener listener)

Added in version 6.14.0

Removes a previously added advanced listener from this barcode selection instance.

In case the listener is not currently observing this instance, calling this method has no effect.

reset()
Future<void> reset()

Added in version 6.10.0

Asynchronously resets the barcode selection session, effectively clearing the history of selected codes.

unfreezeCamera()
Future<void> unfreezeCamera()

Added in version 6.10.0

Unfreeze the camera.