On this page

Stuck? Open a support ticket and the barKoder team will help. Open a ticket

Flutter API reference

Every method, setting, enum and result of the barKoder Flutter SDK, grouped by what you do with it.

Scanning & session #

startScanning #

Dart
Future<void> startScanning(resultsCallback)

Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed.

Parameters:

ParameterTypeDescription
resultsCallbackvoid Function(BarkoderResult)A function to handle the scanning results.

Example usage:

Dart
_barkoder.startScanning((result) {   _updateState(result, false); }); print('Scanning started');

Dart return type: Future<void>.

stopScanning #

Dart
Future<void> stopScanning()

Halts the barcode scanning process, stopping the camera from capturing and processing barcode information.

Example usage:

Dart
await _barkoder.stopScanning(); print('Scanning stopped');

Dart return type: Future<void>.

pauseScanning #

Dart
Future<void> pauseScanning()

Temporarily suspends the barcode scanning process, pausing the camera feed without completely stopping the scanning session

Example usage:

Dart
await _barkoder.pauseScanning(); print('Scanning paused');

Dart return type: Future<void>.

setDecodingSpeed #

Dart
Future<void> setDecodingSpeed(DecodingSpeed decodingSpeed)

Sets the decoding speed for barcode scanning.

Parameters:

ParameterTypeDescription
decodingSpeedDecodingSpeedThe DecodingSpeed to set.

Example usage:

Dart
DecodingSpeed speed = DecodingSpeed.fast; _barkoder.setDecodingSpeed(speed); print('Decoding speed set to:$speed');

Dart return type: Future<void>.

getThreadsLimit #

Dart
Future<int> getThreadsLimit

Retrieves the threads limit.

Returns a Future that completes with an integer representing the threads limit.

Example usage:

Dart
int threadsLimit =await _barkoder.getThreadsLimit; print('Threads limit:$threadsLimit');

Dart return type: Future<int>.

setThreadsLimit #

Dart
Future<void> setThreadsLimit(int threadsLimit)

Sets the threads limit.

Parameters:

ParameterTypeDescription
threadsLimitintThe number of threads to set as the limit.

Example usage:

Dart
int threadsLimit = 2; _barkoder.setThreadsLimit(threadsLimit); print('Threads limit set to:$threadsLimit');

Dart return type: Future<void>.

getDecodingSpeed #

Dart
Future<DecodingSpeed> getDecodingSpeed

Retrieves the current decoding speed setting for barcode scanning

Returns a Future that completes with a DecodingSpeed enum value representing the decoding speed.

Example usage:

Dart
DecodingSpeed speed =await _barkoder.getDecodingSpeed; print('Decoding speed:$speed');

Dart return type: Future<DecodingSpeed>.

setMatchFilter #

Dart
Future setMatchFilter(String matchFilter)

Sets a string or regular expression used to match decoded barcode data.

Parameters:

ParameterTypeDescription
matchFilterStringThe string or regular expression used to match decoded barcode data.

Example usage:

Dart
String matchFilter = r'^[0-9]+$'; _barkoder.setMatchFilter(matchFilter); print('Match filter set to: $matchFilter');

Dart return type: Future<void>.

getMatchFilter #

Dart
Future getMatchFilter()

Retrieves the string or regular expression used to match decoded barcode data.

Returns a Future that completes with a String representing the configured match filter.

Example usage:

Dart
String matchFilter = await _barkoder.getMatchFilter(); print('Match filter: $matchFilter');

Dart return type: Future<String>.

getVersion #

Dart
Future<String> getVersion

Retrieves the version of the Barkoder library.

Returns a Future that completes with a String representing the version of the Barkoder library.

Example usage:

Dart
String version =await _barkoder.getVersion; print('Barkoder library version:$version');

Dart return type: Future<String>.

configureBarkoder #

Dart
Future<void> configureBarkoder(BarkoderConfig barkoderConfig)

Configures the Barkoder functionality based on the provided configuration.

Parameters:

ParameterTypeDescription
barkoderConfigBarkoderConfigThe BarkoderConfig object containing the configuration settings.

Example usage:

Dart
BarkoderConfig config = BarkoderConfig(   pinchToZoomEnabled:true,   beepOnSuccessEnabled:true, // Add other configuration settings here
 ); _barkoder.configureBarkoder(config); print('Barkoder configured successfully.');

Dart return type: Future<void>.

freezeScanning #

Dart
Future freezeScanning()

Freezes the current AR scanning session by capturing a still image from the camera feed. Use only when AR mode is enabled to temporarily freeze the view while keeping overlays visible.

Example usage:

Dart
await _barkoder.freezeScanning(); print('Scanning frozen');

Dart return type: Future<void>.

unfreezeScanning #

Dart
Future unfreezeScanning()

Unfreezes the AR scanning session by removing the still image and reactivating the camera and overlays. Use only when AR mode is enabled to restore the live AR view and continue scanning.

Example usage:

Dart
await _barkoder.unfreezeScanning(); print('Scanning unfrozen');

Dart return type: Future<void>.

getLibVersion #

Dart
Future getLibVersion

Retrieves the version of the Barkoder library.

Returns a Future that completes with a String representing the version of the Barkoder library.

Example usage:

Dart
String libVersion = await _barkoder.getLibVersion; print('Barkoder library version: $libVersion');

Dart return type: Future<String>.

getDeviceId #

Dart
Future getDeviceId

Retrieves the Device ID.

Returns a Future that completes with a String representing the Device ID.

Example usage:

Dart
String deviceId = await _barkoder.getDeviceId; print('Device ID: $deviceId');

Dart return type: Future<String>.

setUPCEexpandToUPCA #

Dart
Future setUPCEexpandToUPCA(bool enabled)

Sets whether the UPC-E barcodes should be expanded to UPC-A format.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable the expansion for UPC-E barcodes.

Example usage:

Dart
bool expandToUPCA = true; _barkoder.setUPCEexpandToUPCA(expandToUPCA); print('UPC-E expansion to UPC-A enabled: $expandToUPCA');

Dart return type: Future<void>.

setUPCE1expandToUPCA #

Dart
Future setUPCE1expandToUPCA(bool enabled)

Sets whether the UPC-E1 barcodes should be expanded to UPC-A format.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable the expansion for UPC-E1 barcodes.

Example usage:

Dart
bool expandToUPCA = true; _barkoder.setUPCE1expandToUPCA(expandToUPCA); print('UPC-E1 expansion to UPC-A enabled: $expandToUPCA');

Dart return type: Future<void>.

setDynamicExposure #

Dart
Future setDynamicExposure(int dynamicExposure)

Sets the camera's exposure dynamically based on the provided intensity, cycling through predefined compensation values.

Parameters:

ParameterTypeDescription
dynamicExposureintThe integer value for the exposure intensity.

Example usage:

Dart
int dynamicExposure = 4; _barkoder.setDynamicExposure(dynamicExposure); print('Camera dynamic exposure: $dynamicExposure');

Dart return type: Future<void>.

setVideoStabilization #

Dart
Future setVideoStabilization(bool value)

Enable or disable video stabilization for smoother video capture.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether video stabilization should be enabled/disabled.

Example usage:

Dart
bool value = true; _barkoder.setVideoStabilization(value); print('Video stabilization: $value');

Dart return type: Future<void>.

selectVisibleBarcodes #

Dart
Future selectVisibleBarcodes()

Selects all barcodes that are currently visible in AR mode.

Example usage:

Dart
_barkoder.selectVisibleBarcodes(); print('Selected visible barcodes');

Dart return type: Future<void>.

getPowerSavingMode #

Dart
Future getPowerSavingMode

Retrieves the power saving mode level.

Example usage:

Dart
int powerSavingMode = await _barkoder.getPowerSavingMode; print('Power saving mode: $powerSavingMode');

Dart return type: Future<int>.

setPowerSavingMode #

Dart
Future setPowerSavingMode(int powerSavingMode)

Power saving mode level. Higher values reduce CPU/battery usage by limiting frame processing.

Default value is 0. 0 - Disabled (full performance) 1 - Light saving 2 - Medium saving 3 - High saving 4 - Maximum saving

Parameters:

ParameterTypeDescription
powerSavingModeintThe power saving mode level to set.

Example usage:

Dart
int powerSavingMode = 1; _barkoder.setPowerSavingMode(powerSavingMode); print('Power saving mode set to: $powerSavingMode');

Dart return type: Future<void>.

BarkoderView #

Dart
const BarkoderView({
  Key? key,
  required String licenseKey,
  required void Function(Barkoder) onBarkoderViewCreated,
})

BarkoderView extends StatelessWidget and embeds the native scanner view.

ParameterTypeDescription
keyKey?Optional inherited widget key.
licenseKeyStringRequired license key passed to the native configuration when creating the view.
onBarkoderViewCreatedvoid Function(Barkoder)Required callback invoked after the platform view is created, with the Dart controller.
PropertyTypeDescription
licenseKeyStringFinal constructor-supplied license key.
onBarkoderViewCreatedvoid Function(Barkoder)Final constructor-supplied controller callback.

Its Widget build(BuildContext context) override creates the platform view through the normal Flutter widget lifecycle.

The Future<void> returned by startScanning completes for the platform start call; scanning results arrive separately in the callback.

startScanning and scanImage each replace the controller's existing scanning-results subscription. stopScanning and pauseScanning cancel that subscription before invoking the native operation.

Camera #

getBarkoderResolution #

Dart
Future <BarkoderResolution> getBarkoderResolution

Retrieves the resolution for barcode scanning.

returns a Future<BarkoderResolution> that completes with a BarkoderResolution enum value.

Example usage:

Dart
BarkoderResolution resolution = await _barkoder.getBarkoderResolution;

Dart return type: Future<BarkoderResolution>.

setFlashEnabled #

Dart
Future setFlashEnabled(bool enabled)

Parameters:

ParameterTypeDescription
enabledbool

Enables or disables the device's flash (torch) for illumination during barcode scanning

enabled: A boolean indicating whether to enable the flash.

Example usage:

Dart
bool flashEnabled =true; await _barkoder.setFlashEnabled(flashEnabled); print('Flash enabled:$flashEnabled');

Dart return type: Future<void>.

setZoomFactor #

Dart
Future setZoomFactor(double zoomFactor)

Sets the zoom factor for the device's camera, adjusting the level of zoom during barcode scanning

Parameters:

ParameterTypeDescription
zoomFactordoubleThe zoom factor to set.

Example usage:

Dart
double zoom = 2.0; await _barkoder.setZoomFactor(zoom); print('Zoom factor set to:$zoom');

Dart return type: Future<void>.

setLocationInPreviewEnabled #

Dart
Future<void> setLocationInPreviewEnabled( bool enabled)

Sets whether location in preview is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable location in preview.

Example usage:

Dart
bool locationInPreviewEnabled =true; _barkoder.setLocationInPreviewEnabled(locationInPreviewEnabled); print('Location in preview enabled:$locationInPreviewEnabled');

Dart return type: Future<void>.

setPinchToZoomEnabled #

Dart
Future<void> setPinchToZoomEnabled(bool enabled)

Sets whether pinch to zoom is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable pinch to zoom.

Example usage:

Dart
bool pinchToZoomEnabled =true; _barkoder.setPinchToZoomEnabled(pinchToZoomEnabled); print('Pinch to zoom enabled:$pinchToZoomEnabled');

Dart return type: Future<void>.

setBarkoderResolution #

Dart
Future<void> setBarkoderResolution(BarkoderResolution resolution)

Sets the resolution for barcode scanning.

Parameters:

ParameterTypeDescription
resolutionBarkoderResolutionThe BarkoderResolution enum value to set.

Example usage:

Dart
BarkoderResolution resolution = BarkoderResolution.HD; await _barkoder.setBarkoderResolution(resolution); print('Barkoder resolution set to:$resolution');

Dart return type: Future<void>.

getMaxZoomFactor #

Dart
Future<double> getMaxZoomFactor()

Retrieves the maximum available zoom factor for the device's camera

Returns a Future that completes with the maximum zoom factor.

Example usage:

Dart
double maxZoom =await _barkoder.getMaxZoomFactor(); print('Maximum zoom factor:$maxZoom');

Dart return type: Future<double>.

isFlashAvailable #

Dart
Future<bool> isFlashAvailable()

Checks whether the device has a built-in flash (torch) that can be used for illumination during barcode scanning.

Returns a Future that completes with a boolean indicating whether the flash is available.

Example usage:

Dart
bool flashAvailable =await _barkoder.isFlashAvailable(); print('Flash available:$flashAvailable');

Dart return type: Future<bool>.

isLocationInPreviewEnabled #

Dart
Future<bool> isLocationInPreviewEnabled

Checks if location in preview is enabled.

Returns a Future that completes with a boolean indicating whether location in preview is enabled.

Example usage:

Dart
bool locationInPreviewEnabled =await _barkoder.isLocationInPreviewEnabled; print('Location in preview enabled:$locationInPreviewEnabled');

Dart return type: Future<bool>.

isPinchToZoomEnabled #

Dart
Future<bool> isPinchToZoomEnabled

Checks if pinch to zoom is enabled.

Returns a Future that completes with a boolean indicating whether pinch to zoom is enabled.

Example usage:

Dart
bool pinchToZoomEnabled =await _barkoder.isPinchToZoomEnabled; print('Pinch to zoom enabled:$pinchToZoomEnabled');

Dart return type: Future<bool>.

getCurrentZoomFactor #

Dart
Future getCurrentZoomFactor()

Retrieves the current zoom factor for the device's camera.

Returns a Future that completes with the current zoom factor.

Example usage:

Dart
double currentZoom = await _barkoder.getCurrentZoomFactor(); print('Current zoom factor: $currentZoom');

Dart return type: Future<double>.

startCamera #

Dart
Future startCamera()

Starts the camera.

Example usage:

Dart
await _barkoder.startCamera(); print('Camera started successfully');

Dart return type: Future<void>.

setCentricFocusAndExposure #

Dart
Future setCentricFocusAndExposure(bool value)

Sets the camera to use the center of the viewfinder for focus and exposure.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether the center of the viewfinder should be used.

Example usage:

Dart
bool value = true; _barkoder.setCentricFocusAndExposure(value); print('Centric focus and exposure: $value');

Dart return type: Future<void>.

setCamera #

Dart
Future setCamera(BarkoderCameraPosition value)

Sets the camera to be used for scanning (back/front).

Parameters:

ParameterTypeDescription
valueBarkoderCameraPositionThe value which camera should be used.

Example usage:

Dart
BarkoderCameraPosition cameraPosition = BarkoderCameraPosition.BACK; _barkoder.setCamera(cameraPosition); print('Barkoder camera position set to: $cameraPosition');

Dart return type: Future<void>.

setPreviewMirrored #

Dart
Future setPreviewMirrored(bool mirrored)

Controls whether the front camera preview is horizontally mirrored.

Parameters:

ParameterTypeDescription
mirroredboolA boolean indicating whether to mirror the front camera preview.

Example usage:

Dart
bool mirrored = true; await _barkoder.setPreviewMirrored(mirrored); print('Preview mirrored: $mirrored');

Dart return type: Future<void>.

isPreviewMirrored #

Dart
Future isPreviewMirrored()

Retrieves whether the front camera preview is horizontally mirrored.

Returns a Future that completes with a boolean indicating whether the front camera preview is mirrored.

Example usage:

Dart
bool mirrored = await _barkoder.isPreviewMirrored(); print('Preview mirrored: $mirrored');

Dart return type: Future<bool>.

Barcode types #

setEncodingCharacterSet #

Dart
Future<void> setEncodingCharacterSet(String characterSet)

Sets the encoding character set for barcode scanning

Parameters:

ParameterTypeDescription
characterSetStringThe encoding character set to set.

Example usage:

Dart
String characterSet = 'utf-8'; _barkoder.setEncodingCharacterSet(characterSet); print('Encoding character set set to:$characterSet');

Dart return type: Future<void>.

getEncodingCharacterSet #

Dart
Future<String> getEncodingCharacterSet

Retrieves the character set used for encoding barcode data

Returns a Future that completes with a String representing the encoding character set.

Example usage:

Dart
String characterSet =await _barkoder.getEncodingCharacterSet; print('Encoding character set:$characterSet');

Dart return type: Future<String>.

getFormattingType #

Dart
Future<FormattingType> getFormattingType

Retrieves the formatting type used for presenting decoded barcode data.

Returns a Future that completes with a FormattingType enum value representing the formatting type.

Example usage:

Dart
FormattingType type =await _barkoder.getFormattingType; print('Formatting type:$type');

Dart return type: Future<FormattingType>.

getMsiChecksumType #

Dart
Future<MsiChecksumType> getMsiChecksumType

Retrieves the MSI checksum type.

Returns a Future that completes with a MsiChecksumType enum value representing the checksum type used for MSI barcodes.

Example usage:

Dart
MsiChecksumType checksumType =await _barkoder.getMsiChecksumType; print('MSI checksum type:$checksumType');

Dart return type: Future<MsiChecksumType>.

getCode11ChecksumType #

Dart
Future<Code11ChecksumType> getCode11ChecksumType

Retrieves the Code11 checksum type.

Returns a Future that completes with a Code11ChecksumType enum value representing the checksum type used for Code11 barcodes.

Example usage:

Dart
Code11ChecksumType checksumType =await _barkoder.getCode11ChecksumType; print('Code11 checksum type:$checksumType');

Dart return type: Future<Code11ChecksumType>.

getCode39ChecksumType #

Dart
Future<Code39ChecksumType> getCode39ChecksumType

Gets the checksum type for Code 39 barcodes.

Returns a Future that completes with a Code39ChecksumType enum value representing the checksum type used for Code39 barcodes.

Example usage:

Dart
Code39ChecksumType checksumType =await _barkoder.getCode39ChecksumType; print('Code39 checksum type:$checksumType');

Dart return type: Future<Code39ChecksumType>.

setFormattingType #

Dart
Future<void> setFormattingType(FormattingType formattingType)

Sets the formatting type for barcode scanning.

Parameters:

ParameterTypeDescription
formattingTypeFormattingTypeThe FormattingType to set.

Example usage:

Dart
FormattingType type = FormattingType.gs1; _barkoder.setFormattingType(type); print('Formatting type set to:$type');

Dart return type: Future<void>.

setMsiChecksumType #

Dart
Future<void> setMsiChecksumType(MsiChecksumType checksumType)

Sets the MSI checksum type.

Parameters:

ParameterTypeDescription
checksumTypeMsiChecksumTypeThe MsiChecksumType to set.

Example usage:

Dart
MsiChecksumType checksumType = MsiChecksumType.mod10; await _barkoder.setMsiChecksumType(checksumType); print('MSI checksum type set to:$checksumType');

Dart return type: Future<void>.

setCode39ChecksumType #

Dart
Future<void> setCode39ChecksumType(Code39ChecksumType checksumType)

Sets the Code39 checksum type.

Parameters:

ParameterTypeDescription
checksumTypeCode39ChecksumTypeThe Code39ChecksumType to set.

Example usage:

Dart
Code39ChecksumType checksumType = Code39ChecksumType.enabled; _barkoder.setCode39ChecksumType(checksumType); print('Code39 checksum type set to:$checksumType');

Dart return type: Future<void>.

setCode11ChecksumType #

Dart
Future<void> setCode11ChecksumType(Code11ChecksumType checksumType)

Sets the Code11 checksum type.

Parameters:

ParameterTypeDescription
checksumTypeCode11ChecksumTypeThe Code11ChecksumType to set.

Example usage:

Dart
Code11ChecksumType checksumType = Code11ChecksumType.single; await _barkoder.setCode11ChecksumType(checksumType); print('Code11 checksum type set to:$checksumType');

Dart return type: Future<void>.

isBarcodeTypeEnabled #

Dart
Future<bool> isBarcodeTypeEnabled(BarcodeType type)

Checks if a specific barcode type is enabled.

Parameters:

ParameterTypeDescription
typeBarcodeTypeThe BarcodeType to check.

Returns a Future that completes with a boolean indicating whether the specified barcode type is enabled.

Example usage:

Dart
BarcodeType type = BarcodeType.code128; bool isEnabled =await _barkoder.isBarcodeTypeEnabled(type); print('Barcode type$type is enabled:$isEnabled');

Dart return type: Future<bool>.

setBarcodeTypeEnabled #

Dart
Future<void> setBarcodeTypeEnabled(BarcodeType type, bool enabled)

Sets whether a specific barcode type is enabled.

Parameters:

ParameterTypeDescription
typeBarcodeTypeThe BarcodeType to enable or disable.
enabledboolA boolean indicating whether to enable or disable the specified barcode type.

Example usage:

Dart
BarcodeType type = BarcodeType.code128; bool isEnabled =true; _barkoder.setBarcodeTypeEnabled(type, isEnabled); print('Barcode type$type set to enabled:$isEnabled');

Dart return type: Future<void>.

getBarcodeTypeLengthRange #

Dart
Future<List<int>> getBarcodeTypeLengthRange(BarcodeType type)

Retrieves the length range of a specific barcode type.

Parameters:

ParameterTypeDescription
typeBarcodeTypeThe BarcodeType to retrieve the length range for.

Returns a Future that completes with a List representing the minimum and maximum length of the specified barcode type.

Example usage:

Dart
BarcodeType type = BarcodeType.code128; List lengthRange =await _barkoder.getBarcodeTypeLengthRange(type); print('Length range of barcode type$type:$lengthRange');

Dart return type: Future<List<int>>.

setBarcodeTypeLengthRange #

Dart
Future<void> setBarcodeTypeLengthRange(BarcodeType type, int min, int max)

Sets the length range for the specified barcode type.

Parameters:

ParameterTypeDescription
typeBarcodeTypeThe BarcodeType to set the length range for.
minintThe minimum length for the barcode type.
maxintThe maximum length for the barcode type.

Example usage:

Dart
BarcodeType type = BarcodeType.code128; int minLength = 6; int maxLength = 20; await _barkoder.setBarcodeTypeLengthRange(type, minLength, maxLength); print('Length range set for barcode type$type: min=$minLength, max=$maxLength');

Dart return type: Future<void>.

setDatamatrixDpmModeEnabled #

Dart
Future<void> setDatamatrixDpmModeEnabled(bool enabled)

Parameters:

ParameterTypeDescription
enabledbool

Sets whether the Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.

Dart return type: Future<void>.

setUpcEanDeblurEnabled #

Dart
Future<void> setUpcEanDeblurEnabled(bool enabled)

Sets whether the deblurring feature for UPC/EAN barcodes is enabled

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable UPC/EAN deblur.

Example usage:

Dart
bool isEnabled =true; await _barkoder.setUpcEanDeblurEnabled(isEnabled); print('UPC/EAN deblur enabled set to:$isEnabled');

Dart return type: Future<void>.

isUpcEanDeblurEnabled #

Dart
Future<bool> isUpcEanDeblurEnabled

Retrieves the value indicating whether deblurring is enabled for UPC/EAN barcodes

Returns a Future that completes with a boolean indicating whether UPC/EAN deblur is enabled.

Example usage:

Dart
bool isEnabled =await _barkoder.isUpcEanDeblurEnabled; print('UPC/EAN deblur enabled:$isEnabled');

Dart return type: Future<bool>.

isMisshaped1DEnabled #

Dart
Future<bool> isMisshaped1DEnabled

Checks if the detection of misshaped 1D barcodes is enabled.

Returns a Future that completes with a boolean indicating whether misshaped 1D barcodes are enabled.

Example usage:

Dart
bool isEnabled =await _barkoder.isMisshaped1DEnabled; print('Misshaped 1D barcodes enabled:$isEnabled');

Dart return type: Future<bool>.

isVINRestrictionsEnabled #

Dart
Future<bool> isVINRestrictionsEnabled

Checks if VIN restrictions are enabled.

Returns a Future that completes with a boolean indicating whether VIN restrictions are enabled.

Example usage:

Dart
bool isEnabled =await _barkoder.isVINRestrictionsEnabled; print('VIN restrictions enabled:$isEnabled');

Dart return type: Future<bool>.

setEnableVINRestrictions #

Dart
Future<void> setEnableVINRestrictions(bool enabled)

Sets whether Vehicle Identification Number (VIN) restrictions are enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable VIN restrictions.

Example usage:

Dart
bool isEnabled =true; _barkoder.setEnableVINRestrictions(isEnabled); print('VIN restrictions enabled set to:$isEnabled');

Dart return type: Future<void>.

setMisshaped1DEnabled #

Dart
Future setMisshaped1DEnabled(bool enabled)

Sets whether the detection of misshaped 1D barcodes is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable misshaped 1D barcodes.

Example usage:

Dart
bool isEnabled = true; _barkoder.setMisshaped1DEnabled(isEnabled); print('Misshaped 1D barcodes enabled set to: $isEnabled');

Dart return type: Future<void>.

isDatamatrixDpmModeEnabled #

Dart
Future isDatamatrixDpmModeEnabled

Retrieves whether Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.

Returns a Future that completes with a boolean indicating whether Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.

Example usage:

Dart
bool isEnabled = await _barkoder.isDatamatrixDpmModeEnabled; print('DPM mode for Datamatrix barcodes enabled: $isEnabled');

Dart return type: Future<bool>.

isQrDpmModeEnabled #

Dart
Future isQrDpmModeEnabled

Retrieves whether Direct Part Marking (DPM) mode for QR barcodes is enabled.

Returns a Future that completes with a boolean indicating whether Direct Part Marking (DPM) mode for QR barcodes is enabled.

Example usage:

Dart
bool isEnabled = await _barkoder.isQrDpmModeEnabled; print('DPM mode for QR barcodes enabled: $isEnabled');

Dart return type: Future<bool>.

setQrDpmModeEnabled #

Dart
Future setQrDpmModeEnabled(bool enabled)

Sets whether the Direct Part Marking (DPM) mode for QR barcodes is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable DPM mode.

Example usage:

Dart
bool isEnabled = true; _barkoder.setQrDpmModeEnabled(isEnabled); print('QR DPM mode enabled set to: $isEnabled');

Dart return type: Future<void>.

isQrMultiPartMergeEnabled #

Dart
Future isQrMultiPartMergeEnabled

Retrieves whether the QR multi-part merge mode is enabled.

Returns a Future that completes with a boolean indicating whether the QR multi-part merge mode is enabled.

Example usage:

Dart
bool isEnabled = await _barkoder.isQrMultiPartMergeEnabled; print('QR multi-part merge mode enabled: $isEnabled');

Dart return type: Future<bool>.

setQrMultiPartMergeEnabled #

Dart
Future setQrMultiPartMergeEnabled(bool enabled)

Sets whether the QR multi-part merge mode is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable multi-part merge mode.

Example usage:

Dart
bool isEnabled = true; _barkoder.setQrMultiPartMergeEnabled(isEnabled); print('QR multi-part merge mode enabled set to: $isEnabled');

Dart return type: Future<void>.

isQrMicroDpmModeEnabled #

Dart
Future isQrMicroDpmModeEnabled

Retrieves whether Direct Part Marking (DPM) mode for QR Micro barcodes is enabled.

Returns a Future that completes with a boolean indicating whether Direct Part Marking (DPM) mode for QR Micro barcodes is enabled.

Example usage:

Dart
bool isEnabled = await _barkoder.isQrMicroDpmModeEnabled; print('DPM mode for QR Micro barcodes enabled: $isEnabled');

Dart return type: Future<bool>.

setQrMicroDpmModeEnabled #

Dart
Future setQrMicroDpmModeEnabled(bool enabled)

Sets whether the Direct Part Marking (DPM) mode for QR Micro barcodes is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable DPM mode.

Example usage:

Dart
bool isEnabled = true; _barkoder.setQrMicroDpmModeEnabled(isEnabled); print('QR Micro DPM mode enabled set to: $isEnabled');

Dart return type: Future<void>.

isIdDocumentMasterChecksumEnabled #

Dart
Future isIdDocumentMasterChecksumEnabled

Retrieves whether Master checksum is enabled when scanning ID Documents.

Returns a Future that completes with a boolean indicating whether Master checksum is enabled when scanning ID Documents.

Example usage:

Dart
bool isEnabled = await _barkoder.isIdDocumentMasterChecksumEnabled; print('ID Documents master checksum is required(enabled): $isEnabled');

Dart return type: Future<bool>.

setIdDocumentMasterChecksumEnabled #

Dart
Future setIdDocumentMasterChecksumEnabled(bool enabled)

Sets whether Master checksum should be required when scanning ID Documents.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable or disable Master checksum.

Example usage:

Dart
bool isEnabled = true; _barkoder.setIdDocumentMasterChecksumEnabled(isEnabled); print('Master checksum enabled set to: $isEnabled');

Dart return type: Future<void>.

setCustomOption #

Dart
Future setCustomOption(String option, int value)

Setting a custom option.

See more details about available options and their values.

Parameters:

ParameterTypeDescription
optionStringA string value for the option key.
valueintAn integer value for the option.

Example usage:

Dart
_barkoder.setCustomOption('optionKey', 1); print('Custom option set.');

Dart return type: Future<void>.

setEnableComposite #

Dart
Future setEnableComposite(int value)

Sets whether Composite Mode should be enabled when scanning.

Parameters:

ParameterTypeDescription
valueintThe integer value if composite mode should be enabled.

Example usage:

Dart
int value = 1; _barkoder.setEnableComposite(value); print('Enable composite: $value');

Dart return type: Future<void>.

Results #

setCloseSessionOnResultEnabled #

Dart
Future<void> setCloseSessionOnResultEnabled(bool enabled)

Enables or disables the automatic closing of the scanning session upon detecting a barcode result

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable closing the session on result.

Example usage:

Dart
bool closeSessionEnabled =true; _barkoder.setCloseSessionOnResultEnabled(closeSessionEnabled); print('Close session on result enabled:$closeSessionEnabled');

Dart return type: Future<void>.

setImageResultEnabled #

Dart
Future<void> setImageResultEnabled(bool enabled)

Enables or disables the capturing and processing of image data when a barcode is successfully detected.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable image result.

Example usage:

Dart
bool imageResultEnabled =true; _barkoder.setImageResultEnabled(imageResultEnabled); print('Image result enabled:$imageResultEnabled');

Dart return type: Future<void>.

setBeepOnSuccessEnabled #

Dart
Future<void> setBeepOnSuccessEnabled(bool enabled)

Enables or disables the audible beep sound upon successfully decoding a barcode

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable beep on success.

Example usage:

Dart
bool beepOnSuccessEnabled =true; await _barkoder.setBeepOnSuccessEnabled(beepOnSuccessEnabled); print('Beep on success enabled:$beepOnSuccessEnabled');

Dart return type: Future<void>.

setVibrateOnSuccessEnabled #

Dart
Future<void> setVibrateOnSuccessEnabled(bool enabled)

Enables or disables the device vibration upon successfully decoding a barcode.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable vibrate on success.

Example usage:

Dart
bool vibrateOnSuccessEnabled =true; await _barkoder.setVibrateOnSuccessEnabled(vibrateOnSuccessEnabled); print('Vibrate on success enabled:$vibrateOnSuccessEnabled');

Dart return type: Future<void>.

setReturnOnlyMatchedResults #

Dart
Future setReturnOnlyMatchedResults(bool value)

Controls whether only results matching the configured match filter are returned.

If false, all decoded results are returned, including unmatched results.

This option only applies when a match filter is active.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether only matched results should be returned.

Example usage:

Dart
bool value = true; _barkoder.setReturnOnlyMatchedResults(value); print('Return only matched results: $value');

Dart return type: Future<void>.

getReturnOnlyMatchedResults #

Dart
Future getReturnOnlyMatchedResults()

Retrieves whether only results matching the configured match filter are returned.

Returns a Future that completes with a boolean value.

Example usage:

Dart
bool value = await _barkoder.getReturnOnlyMatchedResults(); print('Return only matched results: $value');

Dart return type: Future<bool>.

isCloseSessionOnResultEnabled #

Dart
Future<bool> isCloseSessionOnResultEnabled

Enables or disables the automatic closing of the scanning session upon detecting a barcode result.

Returns a Future that completes with a boolean indicating whether the session is closed on result enabled.

Example usage:

Dart
bool closeSessionEnabled =await _barkoder.isCloseSessionOnResultEnabled; print('Close session on result enabled:$closeSessionEnabled');

Dart return type: Future<bool>.

isBeepOnSuccessEnabled #

Dart
Future<bool> isBeepOnSuccessEnabled

Gets the value indicating whether a beep sound is played on successful barcode scanning.

Returns a Future that completes with a boolean indicating whether beep on success is enabled.

Example usage:

Dart
bool beepOnSuccessEnabled =await _barkoder.isBeepOnSuccessEnabled; print('Beep on success enabled:$beepOnSuccessEnabled');

Dart return type: Future<bool>.

isImageResultEnabled #

Dart
Future<bool> isImageResultEnabled

Enables or disables the capturing and processing of image data when a barcode is successfully detected.

Returns a Future that completes with a boolean indicating whether image result is enabled.

Example usage:

Dart
bool imageResultEnabled =await _barkoder.isImageResultEnabled; print('Image result enabled:$imageResultEnabled');

Dart return type: Future<bool>.

setThresholdBetweenDuplicatesScans #

Dart
Future<void> setThresholdBetweenDuplicatesScans(int thresholdBetweenDuplicatesScans)

Sets the threshold between duplicate scans.

Parameters:

ParameterTypeDescription
thresholdBetweenDuplicatesScansintAn integer representing the threshold in seconds between duplicate scans.

Example usage:

Dart
int threshold = 1;// 100 milliseconds
 _barkoder.setThresholdBetweenDuplicatesScans(threshold); print('Threshold between duplicate scans set to:$threshold milliseconds');

Dart return type: Future<void>.

getThresholdBetweenDuplicatesScans #

Dart
Future<int> getThresholdBetweenDuplicatesScans

Retrieves the threshold between duplicate scans.

Returns a Future that completes with an integer representing the threshold between duplicate scans.

Example usage:

Dart
int threshold =await _barkoder.getThresholdBetweenDuplicatesScans; print('Threshold between duplicate scans:$threshold milliseconds');

Dart return type: Future<int>.

setMaximumResultsCount #

Dart
Future setMaximumResultsCount(int maximumResultsCount)

Sets the maximum number of results to be returned from barcode scanning.

Parameters:

ParameterTypeDescription
maximumResultsCountintThe maximum number of results to be returned.

Example usage:

Dart
int maxResults = 10; await _barkoder.setMaximumResultsCount(maxResults); print('Maximum results count set to:$maxResults');

Dart return type: Future<void>.

setMulticodeCachingDuration #

Dart
Future<void> setMulticodeCachingDuration(int multicodeCachingDuration)

Sets the caching duration (in milliseconds) for multi-code results.

Parameters:

ParameterTypeDescription
multicodeCachingDurationintAn integer representing the multicode caching duration in milliseconds.

Example usage:

Dart
int cachingDuration = 5000;// 5 seconds
await _barkoder.setMulticodeCachingDuration(cachingDuration); print('Multicode caching duration set to:$cachingDuration');

Dart return type: Future<void>.

setMulticodeCachingEnabled #

Dart
Future<void> setMulticodeCachingEnabled(bool enabled)

Sets whether multi-code caching is enabled.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable multicode caching.

Example usage:

Dart
bool multicodeCachingEnabled =true; await _barkoder.setMulticodeCachingEnabled(multicodeCachingEnabled); print('Multicode caching enabled:$multicodeCachingEnabled');

Dart return type: Future<void>.

getMaximumResultsCount #

Dart
Future<double> getMaximumResultsCount

Retrieves the maximum number of results to be returned from barcode scanning at once.

Returns a Future that completes with a double representing the maximum number of results to be returned.

Example usage:

Dart
double maxResults =await _barkoder.getMaximumResultsCount; print('Maximum results count:$maxResults');

Dart return type: Future<double>.

setBarcodeThumbnailOnResultEnabled #

Dart
Future<void> setBarcodeThumbnailOnResultEnabled(bool enabled)

Sets whether to enable barcode thumbnail on result.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable barcode thumbnail on result.

Example usage:

Dart
bool thumbnailEnabled =true; await _barkoder.setBarcodeThumbnailOnResultEnabled(thumbnailEnabled); print('Barcode thumbnail on result enabled:$thumbnailEnabled');

Dart return type: Future<void>.

isBarcodeThumbnailOnResultEnabled #

Dart
Future<bool> isBarcodeThumbnailOnResultEnabled

Checks if the barcode thumbnail on result is enabled.

Returns a Future that completes with a boolean indicating whether barcode thumbnail on result is enabled.

Example usage:

Dart
bool thumbnailEnabled =await _barkoder.isBarcodeThumbnailOnResultEnabled; print('Barcode thumbnail on result enabled:$thumbnailEnabled');

Dart return type: Future<bool>.

getMulticodeCachingEnabled #

Dart
Future<bool> getMulticodeCachingEnabled

Retrieves whether multi-code caching is enabled.

Returns a Future that completes with a boolean indicating whether multicode caching is enabled.

Example usage:

Dart
bool multicodeCachingEnabled =await _barkoder.getMulticodeCachingEnabled; print('Multicode caching enabled:$multicodeCachingEnabled');

Dart return type: Future<bool>.

getMulticodeCachingDuration #

Dart
Future<int> getMulticodeCachingDuration

Retrieves the caching duration (in milliseconds) for multi-code results.

Returns a Future that completes with an integer representing the multicode caching duration in milliseconds.

Example usage:

Dart
int cachingDuration =await _barkoder.getMulticodeCachingDuration; print('Multicode caching duration:$cachingDuration');

Dart return type: Future<int>.

captureImage #

Dart
Future captureImage()

Captures the latest camera frame.

Example usage:

Dart
await _barkoder.captureImage(); print('Image captured');

Dart return type: Future<void>.

scanImage #

Dart
Future scanImage(void Function(BarkoderResult) resultsCallback, String base64image)

Scan from base64 image string.

Parameters:

ParameterTypeDescription
resultsCallbackvoid Function(BarkoderResult)A function to handle the scanning results.
base64imageStringThe base64 encoded image string to scan.

Example usage:

Dart
_barkoder.scanImage((result) {   _updateState(result, false); }, base64ImageString); print('Scan image called');

Dart return type: Future<void>.

setShowDuplicatesLocations #

Dart
Future setShowDuplicatesLocations(bool value)

Enables or disables showing duplicate barcode locations on the preview overlay.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether to show duplicate barcode locations.

Example usage:

Dart
_barkoder.setShowDuplicatesLocations(true);

Dart return type: Future<void>.

getShowDuplicatesLocations #

Dart
Future getShowDuplicatesLocations()

Retrieves whether showing duplicate barcode locations in the AR view is enabled.

Returns a Future that completes with a bool value.

Example usage:

Dart
bool showDuplicates = await _barkoder.getShowDuplicatesLocations(); print('Show duplicates locations: $showDuplicates');

Dart return type: Future<bool>.

isVibrateOnSuccessEnabled #

Dart
Future<bool> get isVibrateOnSuccessEnabled

Retrieves the value indicating whether vibration is enabled on successful barcode scanning.

returns a Future<bool> that completes with the current vibrate-on-success setting.

Example usage:

Dart
_barkoder.isVibrateOnSuccessEnabled.then((enabled) {
  print('Vibrate on success enabled: $enabled');
});

Region & overlay #

setRoiLineColor #

Dart
Future setRoiLineColor(String hexColor)

Sets the color of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed

Parameters:

ParameterTypeDescription
hexColorStringThe color to set for the ROI line in hexadecimal format.

Example usage:

Dart
String lineColor = '#00FF00';// Green color
 _barkoder.setRoiLineColor(lineColor); print('ROI line color set to:$lineColor');

Dart return type: Future<void>.

setRoiLineWidth #

Dart
Future setRoiLineWidth(double lineWidth)

Sets the width of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed

Parameters:

ParameterTypeDescription
lineWidthdoubleThe width to set for the ROI line.

Example usage:

Dart
double lineWidth = 2.0; _barkoder.setRoiLineWidth(lineWidth); print('ROI line width set to:$lineWidth');

Dart return type: Future<void>.

setRoiOverlayBackgroundColor #

Dart
Future setRoiOverlayBackgroundColor(String hexColor)

Sets the background color of the region of interest (ROI) overlay.

Parameters:

ParameterTypeDescription
hexColorStringThe color to set for the ROI overlay background in hexadecimal format.

Example usage:

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

Dart return type: Future<void>.

setLocationInImageResultEnabled #

Dart
Future<void> setLocationInImageResultEnabled(bool enabled)

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

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable location in image result.

Example usage:

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

Dart return type: Future<void>.

setRegionOfInterestVisible #

Dart
Future<void> setRegionOfInterestVisible(bool visible)

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

Parameters:

ParameterTypeDescription
visibleboolA boolean indicating whether to make the ROI visible.

Example usage:

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

Dart return type: Future<void>.

setRegionOfInterest #

Dart
Future<void> setRegionOfInterest(double left, double top, double width, double height)

Defines the Region of Interest (ROI) on the camera preview for barcode scanning, specifying an area where the application focuses on detecting barcodes.

Parameters:

ParameterTypeDescription
leftdoubleThe left coordinate of the ROI.
topdoubleThe top coordinate of the ROI.
widthdoubleThe width of the ROI in percentage.
heightdoubleThe height of the ROI in percentage.

Example usage:

Dart
double left = 10.0; double top = 10.0; double width = 80.0; double height = 8.0; _barkoder.setRegionOfInterest(left, top, width, height); print('Region of interest set');

Dart return type: Future<void>.

setLocationLineWidth #

Dart
Future<void> setLocationLineWidth(double lineWidth)

Sets the width of the lines indicating the location of detected barcodes on the camera feed.

Parameters:

ParameterTypeDescription
lineWidthdoubleThe width to set for the location line.

Example usage:

Dart
double lineWidth = 2.0; _barkoder.setLocationLineWidth(lineWidth); print('Location line width set to:$lineWidth');

Dart return type: Future<void>.

setLocationLineColor #

Dart
Future<void> setLocationLineColor(String hexColor)

Sets the color of the lines used to indicate the location of detected barcodes on the camera feed.

Parameters:

ParameterTypeDescription
hexColorStringThe color to set for the location line in hexadecimal format.

Example usage:

Dart
String lineColor = '#FF0000';// Red color
 _barkoder.setLocationLineColor(lineColor); print('Location line color set to:$lineColor');

Dart return type: Future<void>.

getLocationLineColorHex #

Dart
Future<String> getLocationLineColorHex

Retrieves the hexadecimal color code representing the line color used to indicate the location of detected barcodes.

Returns a Future that completes with the color of the location line in hexadecimal format.

Example usage:

Dart
String lineColor =await _barkoder.getLocationLineColorHex; print('Location line color:$lineColor');

Dart return type: Future<String>.

getLocationLineWidth #

Dart
Future<double> getLocationLineWidth

Retrieves the current width setting for the lines indicating the location of detected barcodes on the camera feed.

Returns a Future that completes with the width of the location line.

Example usage:

Dart
double lineWidth =await _barkoder.getLocationLineWidth; print('Location line width:$lineWidth');

Dart return type: Future<double>.

getRoiLineColorHex #

Dart
Future<String> getRoiLineColorHex

Retrieves the hexadecimal color code representing the line color of the Region of Interest (ROI) on the camera preview

Returns a Future that completes with the color of the ROI line in hexadecimal format.

Example usage:

Dart
String lineColor =await _barkoder.getRoiLineColorHex; print('ROI line color:$lineColor');

Dart return type: Future<String>.

getRoiLineWidth #

Dart
Future<double> getRoiLineWidth

Retrieves the current width setting for the lines outlining the Region of Interest (ROI) on the camera preview.

Returns a Future that completes with the width of the ROI line.

Example usage:

Dart
double lineWidth =await _barkoder.getRoiLineWidth; print('ROI line width:$lineWidth');

Dart return type: Future<double>.

getRoiOverlayBackgroundColorHex #

Dart
Future<String> getRoiOverlayBackgroundColorHex

Retrieves the hexadecimal color code representing the background color of the overlay within the Region of Interest (ROI) on the camera preview.

Returns a Future that completes with the background color of the ROI overlay in hexadecimal format.

Example usage:

Dart
String backgroundColor =await _barkoder.getRoiOverlayBackgroundColorHex; print('ROI overlay background color:$backgroundColor');

Dart return type: Future<String>.

getRegionOfInterest #

Dart
Future<List<double>> getRegionOfInterest

Retrieves the region of interest (ROI).

Returns a Future that completes with a list of doubles representing the region of interest left, top, width, height.

Example usage:

Dart
List roi =await _barkoder.getRegionOfInterest; print('Region of interest:$roi');

Dart return type: Future<List<double>>.

isLocationInImageResultEnabled #

Dart
Future<bool> isLocationInImageResultEnabled

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

Returns a Future that completes with a boolean indicating whether location in image result is enabled.

Example usage:

Dart
bool locationInImageResultEnabled =await _barkoder.isLocationInImageResultEnabled; print('Location in image result enabled:$locationInImageResultEnabled');

Dart return type: Future<bool>.

isRegionOfInterestVisible #

Dart
Future<bool> isRegionOfInterestVisible

Checks if the region of interest (ROI) is visible.

Returns a Future that completes with a boolean indicating whether the ROI is visible.

Example usage:

Dart
bool roiVisible =await _barkoder.isRegionOfInterestVisible; print('Region of interest visible:$roiVisible');

Dart return type: Future<bool>.

setRoiCenterMark #

Dart
Future setRoiCenterMark(BarkoderRoiCenterMark roiCenterMark)

Sets the visual marker displayed at the center of the Region of Interest (ROI).

Parameters:

ParameterTypeDescription
roiCenterMarkBarkoderRoiCenterMarkThe BarkoderRoiCenterMark value to set.

Example usage:

Dart
BarkoderRoiCenterMark centerMark = BarkoderRoiCenterMark.crosshair; _barkoder.setRoiCenterMark(centerMark); print('ROI center mark set to: $centerMark');

Dart return type: Future<void>.

getRoiCenterMark #

Dart
Future getRoiCenterMark()

Retrieves the visual marker displayed at the center of the Region of Interest (ROI).

Returns a Future that completes with a BarkoderRoiCenterMark enum value.

Example usage:

Dart
BarkoderRoiCenterMark centerMark = await _barkoder.getRoiCenterMark(); print('ROI center mark: $centerMark');

Dart return type: Future<BarkoderRoiCenterMark>.

getScanningIndicatorColorHex #

Dart
Future getScanningIndicatorColorHex

Retrieves the hexadecimal color code representing the line color of the scanning indicator on the camera preview.

Example usage:

Dart
String indicatorColor = await _barkoder.getScanningIndicatorColorHex; print('Scanning indicator color: $indicatorColor');

Dart return type: Future<String>.

setScanningIndicatorColor #

Dart
Future setScanningIndicatorColor(String hexColor)

Sets the color of the lines outlining the scanning indicator for barcode scanning on the camera feed.

Parameters:

ParameterTypeDescription
hexColorStringThe hexadecimal representation of the color.

Example usage:

Dart
String indicatorColor = '#FF0000'; // Red color
 _barkoder.setScanningIndicatorColor(indicatorColor); print('Scanning indicator color set to: $indicatorColor');

Dart return type: Future<void>.

getScanningIndicatorWidth #

Dart
Future getScanningIndicatorWidth

Retrieves the current width setting for the scanning indicator on the camera preview.

Example usage:

Dart
double indicatorWidth = await _barkoder.getScanningIndicatorWidth; print('Scanning indicator width: $indicatorWidth');

Dart return type: Future<double>.

setScanningIndicatorWidth #

Dart
Future setScanningIndicatorWidth(double lineWidth)

Sets the width of the scanning indicator for barcode scanning on the camera feed.

Parameters:

ParameterTypeDescription
lineWidthdoubleThe width of the scanning indicator to set.

Example usage:

Dart
double indicatorWidth = 3.0; _barkoder.setScanningIndicatorWidth(indicatorWidth); print('Scanning indicator width set to: $indicatorWidth');

Dart return type: Future<void>.

getScanningIndicatorAnimation #

Dart
Future getScanningIndicatorAnimation

Retrieves the current animation setting for the scanning indicator on the camera preview.

Example usage:

Dart
int animation = await _barkoder.getScanningIndicatorAnimation; print('Scanning indicator animation: $animation');

Dart return type: Future<int>.

setScanningIndicatorAnimation #

Dart
Future setScanningIndicatorAnimation(int animation)

Sets the animation of the scanning indicator for barcode scanning on the camera feed.

Parameters:

ParameterTypeDescription
animationintThe animation of the scanning indicator to set.

Example usage:

Dart
int animation = 1; _barkoder.setScanningIndicatorAnimation(animation); print('Scanning indicator animation set to: $animation');

Dart return type: Future<void>.

isScanningIndicatorAlwaysVisible #

Dart
Future isScanningIndicatorAlwaysVisible

Retrieves if the scanning indicator is set to be always visible on the camera preview.

Example usage:

Dart
bool alwaysVisible = await _barkoder.isScanningIndicatorAlwaysVisible; print('Scanning indicator always visible: $alwaysVisible');

Dart return type: Future<bool>.

setScanningIndicatorAlwaysVisible #

Dart
Future setScanningIndicatorAlwaysVisible(bool value)

Sets the scanning indicator to be always shown on the camera feed.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether the scanning indicator should always remain visible.

Example usage:

Dart
bool alwaysVisible = true; _barkoder.setScanningIndicatorAlwaysVisible(alwaysVisible); print('Scanning indicator always visible: $alwaysVisible');

Dart return type: Future<void>.

AR mode #

setARMode #

Dart
Future setARMode(BarkoderARMode value)

Sets the AR mode used for barcode scanning visualization.

Parameters:

ParameterTypeDescription
valueBarkoderARModeThe AR mode to set.

Example usage:

Dart
_barkoder.setARMode(BarkoderARMode.interactiveEnabled);

Dart return type: Future<void>.

setARResultDisappearanceDelayMs #

Dart
Future setARResultDisappearanceDelayMs(int value)

Sets the delay (in milliseconds) after which a detected AR result is considered expired and removed.

Parameters:

ParameterTypeDescription
valueintDelay duration in milliseconds.

Example usage:

Dart
_barkoder.setARResultDisappearanceDelayMs(800);

Dart return type: Future<void>.

setARLocationTransitionSpeed #

Dart
Future setARLocationTransitionSpeed(double value)

Sets the speed at which barcode location overlays transition positions.

Parameters:

ParameterTypeDescription
valuedoubleThe speed value.

Example usage:

Dart
_barkoder.setARLocationTransitionSpeed(0.3);

Dart return type: Future<void>.

setAROverlayRefresh #

Dart
Future setAROverlayRefresh(BarkoderAROverlayRefresh value)

Sets the refresh mode for the AR overlay on the camera preview.

Parameters:

ParameterTypeDescription
valueBarkoderAROverlayRefreshThe AR overlay refresh mode to set.

Example usage:

Dart
_barkoder.setAROverlayRefresh(BarkoderAROverlayRefresh.smooth);

Dart return type: Future<void>.

setARSelectedLocationColor #

Dart
Future setARSelectedLocationColor(String value)

Sets the color used for drawing the overlay around selected barcodes in AR mode.

Parameters:

ParameterTypeDescription
valueStringThe color in hexadecimal format.

Example usage:

Dart
_barkoder.setARSelectedLocationColor('#00FF00');

Dart return type: Future<void>.

setARNonSelectedLocationColor #

Dart
Future setARNonSelectedLocationColor(String value)

Sets the color used for drawing the overlay around non-selected barcodes in AR mode.

Parameters:

ParameterTypeDescription
valueStringThe color in hexadecimal format.

Example usage:

Dart
_barkoder.setARNonSelectedLocationColor('#FF0000');

Dart return type: Future<void>.

setARSelectedLocationLineWidth #

Dart
Future setARSelectedLocationLineWidth(double value)

Sets the line width of the overlay for selected barcodes in AR mode.

Parameters:

ParameterTypeDescription
valuedoubleThe width to set.

Example usage:

Dart
_barkoder.setARSelectedLocationLineWidth(2.0);

Dart return type: Future<void>.

setARNonSelectedLocationLineWidth #

Dart
Future setARNonSelectedLocationLineWidth(double value)

Sets the line width of the overlay for non-selected barcodes in AR mode.

Parameters:

ParameterTypeDescription
valuedoubleThe width to set.

Example usage:

Dart
_barkoder.setARNonSelectedLocationLineWidth(1.0);

Dart return type: Future<void>.

setARLocationType #

Dart
Future setARLocationType(BarkoderARLocationType value)

Sets the style of location overlays drawn around detected barcodes.

Parameters:

ParameterTypeDescription
valueBarkoderARLocationTypeThe location type style to use.

Example usage:

Dart
_barkoder.setARLocationType(BarkoderARLocationType.tight);

Dart return type: Future<void>.

setARDoubleTapToFreezeEnabled #

Dart
Future setARDoubleTapToFreezeEnabled(bool enabled)

Enables or disables the ability to freeze/unfreeze scanning via double-tap gesture in AR mode.

Parameters:

ParameterTypeDescription
enabledboolWhether to enable the double-tap freeze feature.

Example usage:

Dart
_barkoder.setARDoubleTapToFreezeEnabled(true);

Dart return type: Future<void>.

setARImageResultEnabled #

Dart
Future setARImageResultEnabled(bool enabled)

Enables or disables the capturing and processing of image data when a barcode is selected for AR mode.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable image result.

Example usage:

Dart
bool arImageResultEnabled = true; _barkoder.setARImageResultEnabled(arImageResultEnabled); print('AR Image result enabled: $arImageResultEnabled');

Dart return type: Future<void>.

setARBarcodeThumbnailOnResultEnabled #

Dart
Future setARBarcodeThumbnailOnResultEnabled(bool enabled)

Enables or disables the barcode thumbnail on result for AR mode.

Parameters:

ParameterTypeDescription
enabledboolA boolean indicating whether to enable barcode thumbnail on result.

Example usage:

Dart
bool arThumbnailEnabled = true; _barkoder.setARBarcodeThumbnailOnResultEnabled(arThumbnailEnabled); print('AR Barcode thumbnail on result enabled: $arThumbnailEnabled');

Dart return type: Future<void>.

setARResultLimit #

Dart
Future setARResultLimit(int value)

Sets the maximum number of results allowed in a single AR scanning session.

Parameters:

ParameterTypeDescription
valueintThe maximum number of results.

Example usage:

Dart
_barkoder.setARResultLimit(5);

Dart return type: Future<void>.

setARContinueScanningOnLimit #

Dart
Future setARContinueScanningOnLimit(bool value)

Sets whether scanning continues when the result limit is reached (only in .interactiveDisabled mode).

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether to continue scanning.

Example usage:

Dart
_barkoder.setARContinueScanningOnLimit(true);

Dart return type: Future<void>.

setAREmitResultsAtSessionEndOnly #

Dart
Future setAREmitResultsAtSessionEndOnly(bool value)

Sets whether results are emitted only at AR session end (or when the limit is reached).

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether results are emitted only at the end of the session.

Example usage:

Dart
_barkoder.setAREmitResultsAtSessionEndOnly(true);

Dart return type: Future<void>.

setARHeaderHeight #

Dart
Future setARHeaderHeight(double value)

Sets the height of the header text label shown above the barcode in AR mode.

Parameters:

ParameterTypeDescription
valuedoubleHeader height.

Example usage:

Dart
_barkoder.setARHeaderHeight(24.0);

Dart return type: Future<void>.

setARHeaderShowMode #

Dart
Future setARHeaderShowMode(BarkoderARHeaderShowMode value)

Sets the condition under which the header text is shown above the barcode.

Parameters:

ParameterTypeDescription
valueBarkoderARHeaderShowModeThe display mode for the AR header.

Example usage:

Dart
_barkoder.setARHeaderShowMode(BarkoderARHeaderShowMode.onSelected);

Dart return type: Future<void>.

setARHeaderMaxTextHeight #

Dart
Future setARHeaderMaxTextHeight(double value)

Sets the maximum text height used for rendering AR header text.

Parameters:

ParameterTypeDescription
valuedoubleMaximum height.

Example usage:

Dart
_barkoder.setARHeaderMaxTextHeight(22.0);

Dart return type: Future<void>.

setARHeaderMinTextHeight #

Dart
Future setARHeaderMinTextHeight(double value)

Sets the minimum text height used for rendering AR header text.

Parameters:

ParameterTypeDescription
valuedoubleMinimum height.

Example usage:

Dart
_barkoder.setARHeaderMinTextHeight(12.0);

Dart return type: Future<void>.

setARHeaderTextColorSelected #

Dart
Future setARHeaderTextColorSelected(String value)

Sets the text color of the header when the barcode is in a selected state.

Parameters:

ParameterTypeDescription
valueStringThe color in hexadecimal format.

Example usage:

Dart
_barkoder.setARHeaderTextColorSelected('#FFFFFF');

Dart return type: Future<void>.

setARHeaderTextColorNonSelected #

Dart
Future setARHeaderTextColorNonSelected(String value)

Sets the text color of the header when the barcode is not selected.

Parameters:

ParameterTypeDescription
valueStringThe color in hexadecimal format.

Example usage:

Dart
_barkoder.setARHeaderTextColorNonSelected('#AAAAAA');

Dart return type: Future<void>.

setARHeaderHorizontalTextMargin #

Dart
Future setARHeaderHorizontalTextMargin(double value)

Sets the horizontal margin applied to the header text in AR mode, creating equal padding on both sides.

Parameters:

ParameterTypeDescription
valuedoubleHorizontal margin.

Example usage:

Dart
_barkoder.setARHeaderHorizontalTextMargin(8.0);

Dart return type: Future<void>.

setARHeaderVerticalTextMargin #

Dart
Future setARHeaderVerticalTextMargin(double value)

Sets the vertical margin applied to the header text in AR mode, creating equal padding on both sides.

Parameters:

ParameterTypeDescription
valuedoubleVertical margin.

Example usage:

Dart
_barkoder.setARHeaderVerticalTextMargin(4.0);

Dart return type: Future<void>.

setARHeaderTextFormat #

Dart
Future setARHeaderTextFormat(String value)

Sets the format string for the AR header text above each barcode.

Parameters:

ParameterTypeDescription
valueStringFormat string with placeholders (e.g., [barcode_text]).

Example usage:

Dart
_barkoder.setARHeaderTextFormat('[barcode_text] - [barcode_type]');

Dart return type: Future<void>.

resetARCache #

Dart
Future resetARCache()

Clears all cached barcode results from the current AR scanning session.

Example usage:

Dart
await _barkoder.resetARCache(); print('AR cache reset');

Dart return type: Future<void>.

getARMode #

Dart
Future getARMode()

Retrieves the current AR mode used for barcode scanning.

Returns a Future that completes with a BarkoderARMode value.

Example usage:

Dart
BarkoderARMode mode = await _barkoder.getARMode(); print('Current AR Mode: $mode');

Dart return type: Future<BarkoderARMode>.

setARReturnOnlyMatchedResults #

Dart
Future setARReturnOnlyMatchedResults(bool value)

Controls whether only matched results are returned in AR match filter mode.

If false, all detected results are returned, while unmatched results have isMatched set to false.

This option only applies when AR mode is matchFilter and a match filter is active.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether only matched results should be returned.

Example usage:

Dart
bool value = true; _barkoder.setARReturnOnlyMatchedResults(value); print('AR return only matched results: $value');

Dart return type: Future<void>.

getARReturnOnlyMatchedResults #

Dart
Future getARReturnOnlyMatchedResults()

Retrieves whether only matched results are returned in AR match filter mode.

Returns a Future that completes with a boolean value.

Example usage:

Dart
bool value = await _barkoder.getARReturnOnlyMatchedResults(); print('AR return only matched results: $value');

Dart return type: Future<bool>.

setARDisplayOnlyMatchedResults #

Dart
Future setARDisplayOnlyMatchedResults(bool value)

Controls whether only matched results are displayed in AR match filter mode.

If false, all decoded results are displayed, including unmatched results.

This option only applies when AR mode is matchFilter and a match filter is active.

Parameters:

ParameterTypeDescription
valueboolA boolean indicating whether only matched results should be displayed.

Example usage:

Dart
bool value = true; _barkoder.setARDisplayOnlyMatchedResults(value); print('AR display only matched results: $value');

Dart return type: Future<void>.

getARDisplayOnlyMatchedResults #

Dart
Future getARDisplayOnlyMatchedResults()

Retrieves whether only matched results are displayed in AR match filter mode.

Returns a Future that completes with a boolean value.

Example usage:

Dart
bool value = await _barkoder.getARDisplayOnlyMatchedResults(); print('AR display only matched results: $value');

Dart return type: Future<bool>.

getARResultDisappearanceDelayMs #

Dart
Future getARResultDisappearanceDelayMs()

Retrieves the delay after which AR results disappear once detected.

Returns a Future that completes with an int value.

Example usage:

Dart
int delay = await _barkoder.getARResultDisappearanceDelayMs(); print('AR result disappearance delay: $delay ms');

Dart return type: Future<int>.

getARLocationTransitionSpeed #

Dart
Future getARLocationTransitionSpeed()

Retrieves the transition speed for AR barcode location overlays.

Returns a Future that completes with a double value.

Example usage:

Dart
double speed = await _barkoder.getARLocationTransitionSpeed(); print('AR transition speed: $speed');

Dart return type: Future<double>.

getAROverlayRefresh #

Dart
Future getAROverlayRefresh()

Retrieves the AR overlay refresh mode.

Returns a Future that completes with a BarkoderAROverlayRefresh enum value.

Example usage:

Dart
var mode = await _barkoder.getAROverlayRefresh(); print('AR overlay refresh mode: $mode');

Dart return type: Future<BarkoderAROverlayRefresh>.

getARSelectedLocationColor #

Dart
Future getARSelectedLocationColor()

Retrieves the color used for selected barcode overlays in AR mode.

Returns a Future that completes with a String hex color.

Example usage:

Dart
String color = await _barkoder.getARSelectedLocationColor(); print('Selected location color: $color');

Dart return type: Future<String>.

getARNonSelectedLocationColor #

Dart
Future getARNonSelectedLocationColor()

Retrieves the color used for non-selected barcode overlays in AR mode.

Returns a Future that completes with a String hex color.

Example usage:

Dart
String color = await _barkoder.getARNonSelectedLocationColor(); print('Non-selected location color: $color');

Dart return type: Future<String>.

getARSelectedLocationLineWidth #

Dart
Future getARSelectedLocationLineWidth()

Retrieves the line width for selected barcode overlays in AR mode.

Returns a Future that completes with a double value.

Example usage:

Dart
double width = await _barkoder.getARSelectedLocationLineWidth(); print('Selected line width: $width');

Dart return type: Future<double>.

getARNonSelectedLocationLineWidth #

Dart
Future getARNonSelectedLocationLineWidth()

Retrieves the line width for non-selected barcode overlays in AR mode.

Returns a Future that completes with a double value.

Example usage:

Dart
double width = await _barkoder.getARNonSelectedLocationLineWidth(); print('Non-selected line width: $width');

Dart return type: Future<double>.

getARLocationType #

Dart
Future getARLocationType()

Retrieves the style of AR location overlays (tight, bounding box, none).

Returns a Future that completes with a BarkoderARLocationType value.

Example usage:

Dart
var type = await _barkoder.getARLocationType(); print('AR location type: $type');

Dart return type: Future<BarkoderARLocationType>.

isARDoubleTapToFreezeEnabled #

Dart
Future isARDoubleTapToFreezeEnabled()

Checks whether double-tap to freeze is enabled in AR mode.

Returns a Future that completes with a bool value.

Example usage:

Dart
bool enabled = await _barkoder.isARDoubleTapToFreezeEnabled(); print('Double tap to freeze: $enabled');

Dart return type: Future<bool>.

isARImageResultEnabled #

Dart
Future isARImageResultEnabled

Retrieves whether image result is enabled for AR mode.

Returns a Future that completes with a boolean indicating whether image result is enabled.

Example usage:

Dart
bool arImageResultEnabled = await _barkoder.isARImageResultEnabled; print('AR Image result enabled: $arImageResultEnabled');

Dart return type: Future<bool>.

isARBarcodeThumbnailOnResultEnabled #

Dart
Future isARBarcodeThumbnailOnResultEnabled

Retrieves whether barcode thumbnail on result is enabled for AR mode.

Returns a Future that completes with a boolean indicating whether barcode thumbnail on result is enabled.

Example usage:

Dart
bool arThumbnailEnabled = await _barkoder.isARBarcodeThumbnailOnResultEnabled; print('AR Barcode thumbnail on result enabled: $arThumbnailEnabled');

Dart return type: Future<bool>.

getARResultLimit #

Dart
Future getARResultLimit

Retrieves the maximum number of results allowed in a single AR scanning session.

Example usage:

Dart
int resultLimit = await _barkoder.getARResultLimit;

Dart return type: Future<int>.

getARContinueScanningOnLimit #

Dart
Future getARContinueScanningOnLimit

Retrieves whether scanning continues when the result limit is reached (only in .interactiveDisabled mode).

Example usage:

Dart
bool continueScanning = await _barkoder.getARContinueScanningOnLimit;

Dart return type: Future<bool>.

getAREmitResultsAtSessionEndOnly #

Dart
Future getAREmitResultsAtSessionEndOnly

Retrieves whether results are emitted only at AR session end (or when the limit is reached).

Example usage:

Dart
bool emitAtEnd = await _barkoder.getAREmitResultsAtSessionEndOnly;

Dart return type: Future<bool>.

getARHeaderHeight #

Dart
Future getARHeaderHeight()

Retrieves the header height above barcode in AR mode.

Returns a Future that completes with a double value.

Example usage:

Dart
double height = await _barkoder.getARHeaderHeight(); print('AR header height: $height');

Dart return type: Future<double>.

getARHeaderShowMode #

Dart
Future getARHeaderShowMode()

Retrieves the header display mode (always, on selected, never).

Returns a Future that completes with a BarkoderARHeaderShowMode value.

Example usage:

Dart
var mode = await _barkoder.getARHeaderShowMode(); print('AR header show mode: $mode');

Dart return type: Future<BarkoderARHeaderShowMode>.

getARHeaderMaxTextHeight #

Dart
Future getARHeaderMaxTextHeight()

Retrieves the maximum text height for AR headers.

Returns a Future that completes with a double value.

Example usage:

Dart
double maxHeight = await _barkoder.getARHeaderMaxTextHeight(); print('Max text height: $maxHeight');

Dart return type: Future<double>.

getARHeaderMinTextHeight #

Dart
Future getARHeaderMinTextHeight()

Retrieves the minimum text height for AR headers.

Returns a Future that completes with a double value.

Example usage:

Dart
double minHeight = await _barkoder.getARHeaderMinTextHeight(); print('Min text height: $minHeight');

Dart return type: Future<double>.

getARHeaderTextColorSelected #

Dart
Future getARHeaderTextColorSelected()

Retrieves the header text color for selected barcodes.

Returns a Future that completes with a String hex color.

Example usage:

Dart
String color = await _barkoder.getARHeaderTextColorSelected(); print('Header selected text color: $color');

Dart return type: Future<String>.

getARHeaderTextColorNonSelected #

Dart
Future getARHeaderTextColorNonSelected()

Retrieves the header text color for non-selected barcodes.

Returns a Future that completes with a String hex color.

Example usage:

Dart
String color = await _barkoder.getARHeaderTextColorNonSelected(); print('Header non-selected text color: $color');

Dart return type: Future<String>.

getARHeaderHorizontalTextMargin #

Dart
Future getARHeaderHorizontalTextMargin()

Retrieves the horizontal margin for AR header text.

Returns a Future that completes with a double value.

Example usage:

Dart
double margin = await _barkoder.getARHeaderHorizontalTextMargin(); print('Header horizontal margin: $margin');

Dart return type: Future<double>.

getARHeaderVerticalTextMargin #

Dart
Future getARHeaderVerticalTextMargin()

Retrieves the vertical margin for AR header text.

Returns a Future that completes with a double value.

Example usage:

Dart
double margin = await _barkoder.getARHeaderVerticalTextMargin(); print('Header vertical margin: $margin');

Dart return type: Future<double>.

getARHeaderTextFormat #

Dart
Future getARHeaderTextFormat()

Retrieves the format string used for AR header text.

Returns a Future that completes with a String value.

Example usage:

Dart
String format = await _barkoder.getARHeaderTextFormat(); print('Header text format: $format');

Dart return type: Future<String>.

On-screen buttons #

onCloseButtonTapped #

Dart
void onCloseButtonTapped(VoidCallback handler)

Registers a callback to handle the SDK Close button tap event during scanning (configured via configureCloseButton).

Parameters:

ParameterTypeDescription
handlerVoidCallbackFunction to execute when the SDK Close button is pressed.

Example usage:

Dart
_barkoder.onCloseButtonTapped(() {   print('Close button tapped'); });

Dart return type: void.

configureCloseButton #

Dart
Future<void> configureCloseButton({
  required bool visible,
  required double positionX,
  required double positionY,
  required double iconSize,
  required String tintColor,
  required String backgroundColor,
  required double cornerRadius,
  required double padding,
  required bool useCustomIcon,
  required String customIcon, // base64 string
}) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
      code: BarkoderErrors.barkoderViewNotMounted,
      message: BarkoderErrors.barkodeViewNotMountedDesc,
    ));
  }

  return _methodChannel.invokeMethod('configureCloseButton', {
    'visible': visible,
    'positionX': positionX,
    'positionY': positionY,
    'iconSize': iconSize,
    'tintColor': tintColor,
    'backgroundColor': backgroundColor,
    'cornerRadius': cornerRadius,
    'padding': padding,
    'useCustomIcon': useCustomIcon,
    'customIcon': customIcon,
  });
}

Configures the close button shown during scanning. To perform an action when the button is tapped, register a callback using onCloseButtonTapped

All color strings are hex (e.g., "#3472c9"), and icon strings are Base64.

Parameters:

ParameterTypeDescription
visibleboolRequired named argument. Show the button while scanning.
positionXdoubleRequired named argument. X position in points.
positionYdoubleRequired named argument. Y position in points.
iconSizedoubleRequired named argument. Glyph point size.
tintColorStringRequired named argument. Icon tint as a hex string; leave "" to use the default.
backgroundColorStringRequired named argument. Button background as a hex string; leave "" for default (clear).
cornerRadiusdoubleRequired named argument. Corner radius.
paddingdoubleRequired named argument. Inner padding around the glyph.
useCustomIconboolRequired named argument. Set true to use the provided custom icon.
customIconStringRequired named argument. Custom icon as a Base64-encoded image string.

Dart return type: Future<void>.

configureFlashButton #

Dart
Future<void> configureFlashButton({
  required bool visible,
  required double positionX,
  required double positionY,
  required double iconSize,
  required String tintColor,
  required String backgroundColor,
  required double cornerRadius,
  required double padding,
  required bool useCustomIcon,
  required String customIconFlashOn,  // base64
  required String customIconFlashOff, // base64
}) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
      code: BarkoderErrors.barkoderViewNotMounted,
      message: BarkoderErrors.barkodeViewNotMountedDesc,
    ));
  }

  return _methodChannel.invokeMethod('configureFlashButton', {
    'visible': visible,
    'positionX': positionX,
    'positionY': positionY,
    'iconSize': iconSize,
    'tintColor': tintColor,
    'backgroundColor': backgroundColor,
    'cornerRadius': cornerRadius,
    'padding': padding,
    'useCustomIcon': useCustomIcon,
    'customIconFlashOn': customIconFlashOn,
    'customIconFlashOff': customIconFlashOff,
  });
}

Configures the flash (torch) button displayed during scanning; auto-hides if the device torch is unavailable. All color strings are hex (e.g., "#3472c9"), and icon strings are Base64.

Parameters:

ParameterTypeDescription
visibleboolRequired named argument. Show the button while scanning.
positionXdoubleRequired named argument. X position in points.
positionYdoubleRequired named argument. Y position in points.
iconSizedoubleRequired named argument. Glyph point size.
tintColorStringRequired named argument. Icon tint as a hex string; leave "" to use the default.
backgroundColorStringRequired named argument. Button background as a hex string; leave "" for default (clear).
cornerRadiusdoubleRequired named argument. Corner radius.
paddingdoubleRequired named argument. Inner padding around the glyph.
useCustomIconboolRequired named argument. Set true to use the provided custom icons.
customIconFlashOnStringRequired named argument. ON-state icon as a Base64-encoded image string.
customIconFlashOffStringRequired named argument. OFF-state icon as a Base64-encoded image string.

Dart return type: Future<void>.

configureZoomButton #

Dart
Future<void> configureZoomButton({
  required bool visible,
  required double positionX,
  required double positionY,
  required double iconSize,
  required String tintColor,
  required String backgroundColor,
  required double cornerRadius,
  required double padding,
  required bool useCustomIcon,
  required String customIconZoomedIn,   // base64
  required String customIconZoomedOut,  // base64
  required double zoomedInFactor,
  required double zoomedOutFactor,
}) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
      code: BarkoderErrors.barkoderViewNotMounted,
      message: BarkoderErrors.barkodeViewNotMountedDesc,
    ));
  }

  return _methodChannel.invokeMethod('configureZoomButton', {
    'visible': visible,
    'positionX': positionX,
    'positionY': positionY,
    'iconSize': iconSize,
    'tintColor': tintColor,
    'backgroundColor': backgroundColor,
    'cornerRadius': cornerRadius,
    'padding': padding,
    'useCustomIcon': useCustomIcon,
    'customIconZoomedIn': customIconZoomedIn,
    'customIconZoomedOut': customIconZoomedOut,
    'zoomedInFactor': zoomedInFactor,
    'zoomedOutFactor': zoomedOutFactor,
  });
}

Configures the zoom button displayed during scanning. All color strings are hex (e.g., "#3472c9"), and icon strings are Base64.

Parameters:

ParameterTypeDescription
visibleboolRequired named argument. Show the button while scanning.
positionXdoubleRequired named argument. X position in points.
positionYdoubleRequired named argument. Y position in points.
iconSizedoubleRequired named argument. Glyph point size.
tintColorStringRequired named argument. Icon tint as a hex string; leave "" to use the default.
backgroundColorStringRequired named argument. Button background as a hex string; leave "" for default (clear).
cornerRadiusdoubleRequired named argument. Corner radius.
paddingdoubleRequired named argument. Inner padding around the glyph.
useCustomIconboolRequired named argument. Set true to use the provided custom icons.
customIconZoomedInStringRequired named argument. Zoomed-in state icon as a Base64-encoded image string.
customIconZoomedOutStringRequired named argument. Zoomed-out state icon as a Base64-encoded image string.
zoomedInFactordoubleRequired named argument. Zoom factor to apply when toggled in (e.g., 2.0).
zoomedOutFactordoubleRequired named argument. Zoom factor to apply when toggled out (e.g., 1.0).

Dart return type: Future<void>.

Result models #

In the tables below, ? marks a nullable property. Optional images and lists may be null, and lists may be empty.

Receiving BarkoderResult #

startScanning and scanImage deliver a BarkoderResult through their callbacks, not through their Future<void> return values. The wrapper converts the native JSON payload into Dart models and decodes image data into bytes.

For scanImage, pass a plain Base64 image string, such as base64Encode(imageBytes) from dart:convert, without a data-URL prefix. Invalid image input may not produce a callback or complete the call.

captureImage() also returns Future<void>, not image bytes. Available result images are exposed through the callback model.

BarkoderResult #

Dart
BarkoderResult({
  required List<DecoderResult> decoderResults,
  List<Uint8List>? resultThumbnails,
  Uint8List? resultImage,
})
PropertyTypeDescription
decoderResultsList<DecoderResult>Decoded results; may be empty.
resultThumbnails?List<Uint8List>?Thumbnail image bytes, or null when unavailable. Not guaranteed to contain one image per decoded result.
resultImage?Uint8List?Result image bytes, or null when unavailable.

Use setImageResultEnabled and setBarcodeThumbnailOnResultEnabled to request images, or their AR equivalents, setARImageResultEnabled and setARBarcodeThumbnailOnResultEnabled. Availability depends on the native result.

Raw resultImageAsBase64 and resultThumbnailsAsBase64 contain Base64-encoded JPEG data, not data URLs. The wrapper decodes these into Uint8List; no further Base64 decoding is needed. Import dart:typed_data to name this type.

DecoderResult #

Dart
DecoderResult({
  required int barcodeType,
  required String barcodeTypeName,
  required String binaryDataAsBase64,
  required String textualData,
  required bool isMatched,
  String? characterSet,
  Map<String, dynamic>? extra,
  List<MRZImage>? mrzImages,
  List<Map<String, double>>? locationPoints,
  Uint8List? sadlImage,
})
PropertyTypeDescription
barcodeTypeintNative barcode-type identifier, not a Dart BarcodeType enum.
barcodeTypeNameStringBarcode-type name supplied by the decoder.
binaryDataAsBase64StringBarcode binary data as a Base64 string; use base64Decode if bytes are needed.
textualDataStringDecoded barcode text.
isMatchedboolWhether the native decoder marked the result as matched.
characterSet?String?Character-set information, when available.
extra?Map<String, dynamic>?Additional metadata parsed from the raw extra JSON string. Keys depend on the result.
mrzImages?List<MRZImage>?Available MRZ images converted from mrzImagesAsBase64: main, document, signature, or picture.
locationPoints?List<Map<String, double>>?Native location points as x/y maps, with numeric coordinates converted to double.
sadlImage?Uint8List?South African driver's-license image bytes decoded from sadlImageAsBase64, when available.

Unavailable optional fields are null; MRZ and location-point lists may be empty. Location points are passed through without coordinate normalization or a guaranteed cross-platform point count.

MRZImage #

Dart
MRZImage({required String name, required Uint8List value})
PropertyTypeDescription
nameStringFinal image-descriptor name. The native result bridges include main, document, signature, and picture when available; not every MRZ result contains every image.
valueUint8ListFinal image bytes, decoded from the raw descriptor's base64 string. The raw bridge key is base64; the Dart property is value.
Dart
factory MRZImage.fromJson(Map<String, dynamic> json)

The factory requires string fields name and base64 and decodes base64 with base64Decode. Missing or incorrectly typed fields and invalid Base64 can throw. Native MRZ image descriptors contain plain Base64-encoded JPEG data, not data URLs.

Enums #

The Value column is the Dart enum member's zero-based index, not a string value or a separately assigned SDK identifier. Pass enum members to Dart methods; the wrapper serializes their indexes where required.

BarcodeType #

Used by barcode enablement and length-range methods. A decoder result exposes a numeric barcodeType, not a BarcodeType object.

MemberValue
aztec0
aztecCompact1
qr2
qrMicro3
code1284
code935
code396
codabar7
code118
msi9
upcA10
upcE11
upcE112
ean1313
ean814
pdf41715
pdf417Micro16
datamatrix17
code2518
interleaved2519
itf1420
iata2521
matrix2522
datalogic2523
coop2524
code3225
telepen26
dotcode27
idDocument28
databar1429
databarLimited30
databarExpanded31
postalIMB32
postnet33
planet34
australianPost35
royalMail36
kix37
japanesePost38
maxiCode39
ocrText40

FormattingType #

Used by setFormattingType and getFormattingType.

MemberValue
disabled0
automatic1
gs12
aamva3
sadl4
bcbp5

MsiChecksumType #

Used by setMsiChecksumType and getMsiChecksumType.

MemberValue
disabled0
mod101
mod112
mod10103
mod11104
mod11IBM5
mod1110IBM6

Code39ChecksumType #

Used by setCode39ChecksumType and getCode39ChecksumType.

MemberValue
disabled0
enabled1

Code11ChecksumType #

Used by setCode11ChecksumType and getCode11ChecksumType.

MemberValue
disabled0
single1
double2

DecodingSpeed #

Used by setDecodingSpeed and getDecodingSpeed.

MemberValue
fast0
normal1
slow2
rigorous3

BarkoderCameraPosition #

Used by setCamera. Member names are uppercase.

MemberValue
BACK0
FRONT1

BarkoderResolution #

Used by setBarkoderResolution and getBarkoderResolution. Member names are uppercase.

MemberValue
HD0
FHD1
UHD2

BarkoderRoiCenterMark #

Used by setRoiCenterMark and getRoiCenterMark.

MemberValue
none0
crosshair1
point2

BarkoderARMode #

Used by setARMode and getARMode.

MemberValue
off0
interactiveDisabled1
interactiveEnabled2
nonInteractive3
matchFilter4

BarkoderAROverlayRefresh #

Used by setAROverlayRefresh and getAROverlayRefresh.

MemberValue
smooth0
normal1

BarkoderARLocationType #

Used by setARLocationType and getARLocationType.

MemberValue
none0
tight1
boundingBox2

BarkoderARHeaderShowMode #

Used by setARHeaderShowMode and getARHeaderShowMode.

MemberValue
never0
always1
onSelected2

IdDocumentMasterChecksumType #

Used by the public IdDocumentBarcodeConfig.masterChecksum property.

MemberValue
disabled0
enabled1

barkoder.com | https://barkoder.com/docs/v1/home