Flutter API reference
Every method, setting, enum and result of the barKoder Flutter SDK, grouped by what you do with it.
Scanning & session #
startScanning #
Future<void> startScanning(resultsCallback)
Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
resultsCallback | void Function(BarkoderResult) | A function to handle the scanning results. |
Example usage:
_barkoder.startScanning((result) { _updateState(result, false); }); print('Scanning started');
Dart return type: Future<void>.
stopScanning #
Future<void> stopScanning()
Halts the barcode scanning process, stopping the camera from capturing and processing barcode information.
Example usage:
await _barkoder.stopScanning(); print('Scanning stopped');
Dart return type: Future<void>.
pauseScanning #
Future<void> pauseScanning()
Temporarily suspends the barcode scanning process, pausing the camera feed without completely stopping the scanning session
Example usage:
await _barkoder.pauseScanning(); print('Scanning paused');
Dart return type: Future<void>.
setDecodingSpeed #
Future<void> setDecodingSpeed(DecodingSpeed decodingSpeed)
Sets the decoding speed for barcode scanning.
Parameters:
| Parameter | Type | Description |
|---|---|---|
decodingSpeed | DecodingSpeed | The DecodingSpeed to set. |
Example usage:
DecodingSpeed speed = DecodingSpeed.fast; _barkoder.setDecodingSpeed(speed); print('Decoding speed set to:$speed');
Dart return type: Future<void>.
getThreadsLimit #
Future<int> getThreadsLimit
Retrieves the threads limit.
Returns a Future that completes with an integer representing the threads limit.
Example usage:
int threadsLimit =await _barkoder.getThreadsLimit; print('Threads limit:$threadsLimit');
Dart return type: Future<int>.
setThreadsLimit #
Future<void> setThreadsLimit(int threadsLimit)
Sets the threads limit.
Parameters:
| Parameter | Type | Description |
|---|---|---|
threadsLimit | int | The number of threads to set as the limit. |
Example usage:
int threadsLimit = 2; _barkoder.setThreadsLimit(threadsLimit); print('Threads limit set to:$threadsLimit');
Dart return type: Future<void>.
getDecodingSpeed #
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:
DecodingSpeed speed =await _barkoder.getDecodingSpeed; print('Decoding speed:$speed');
Dart return type: Future<DecodingSpeed>.
setMatchFilter #
Future setMatchFilter(String matchFilter)
Sets a string or regular expression used to match decoded barcode data.
Parameters:
| Parameter | Type | Description |
|---|---|---|
matchFilter | String | The string or regular expression used to match decoded barcode data. |
Example usage:
String matchFilter = r'^[0-9]+$'; _barkoder.setMatchFilter(matchFilter); print('Match filter set to: $matchFilter');
Dart return type: Future<void>.
getMatchFilter #
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:
String matchFilter = await _barkoder.getMatchFilter(); print('Match filter: $matchFilter');
Dart return type: Future<String>.
getVersion #
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:
String version =await _barkoder.getVersion; print('Barkoder library version:$version');
Dart return type: Future<String>.
configureBarkoder #
Future<void> configureBarkoder(BarkoderConfig barkoderConfig)
Configures the Barkoder functionality based on the provided configuration.
Parameters:
| Parameter | Type | Description |
|---|---|---|
barkoderConfig | BarkoderConfig | The BarkoderConfig object containing the configuration settings. |
Example usage:
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 #
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:
await _barkoder.freezeScanning(); print('Scanning frozen');
Dart return type: Future<void>.
unfreezeScanning #
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:
await _barkoder.unfreezeScanning(); print('Scanning unfrozen');
Dart return type: Future<void>.
getLibVersion #
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:
String libVersion = await _barkoder.getLibVersion; print('Barkoder library version: $libVersion');
Dart return type: Future<String>.
getDeviceId #
Future getDeviceId
Retrieves the Device ID.
Returns a Future that completes with a String representing the Device ID.
Example usage:
String deviceId = await _barkoder.getDeviceId; print('Device ID: $deviceId');
Dart return type: Future<String>.
setUPCEexpandToUPCA #
Future setUPCEexpandToUPCA(bool enabled)
Sets whether the UPC-E barcodes should be expanded to UPC-A format.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable the expansion for UPC-E barcodes. |
Example usage:
bool expandToUPCA = true; _barkoder.setUPCEexpandToUPCA(expandToUPCA); print('UPC-E expansion to UPC-A enabled: $expandToUPCA');
Dart return type: Future<void>.
setUPCE1expandToUPCA #
Future setUPCE1expandToUPCA(bool enabled)
Sets whether the UPC-E1 barcodes should be expanded to UPC-A format.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable the expansion for UPC-E1 barcodes. |
Example usage:
bool expandToUPCA = true; _barkoder.setUPCE1expandToUPCA(expandToUPCA); print('UPC-E1 expansion to UPC-A enabled: $expandToUPCA');
Dart return type: Future<void>.
setDynamicExposure #
Future setDynamicExposure(int dynamicExposure)
Sets the camera's exposure dynamically based on the provided intensity, cycling through predefined compensation values.
Parameters:
| Parameter | Type | Description |
|---|---|---|
dynamicExposure | int | The integer value for the exposure intensity. |
Example usage:
int dynamicExposure = 4; _barkoder.setDynamicExposure(dynamicExposure); print('Camera dynamic exposure: $dynamicExposure');
Dart return type: Future<void>.
setVideoStabilization #
Future setVideoStabilization(bool value)
Enable or disable video stabilization for smoother video capture.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether video stabilization should be enabled/disabled. |
Example usage:
bool value = true; _barkoder.setVideoStabilization(value); print('Video stabilization: $value');
Dart return type: Future<void>.
selectVisibleBarcodes #
Future selectVisibleBarcodes()
Selects all barcodes that are currently visible in AR mode.
Example usage:
_barkoder.selectVisibleBarcodes(); print('Selected visible barcodes');
Dart return type: Future<void>.
getPowerSavingMode #
Future getPowerSavingMode
Retrieves the power saving mode level.
Example usage:
int powerSavingMode = await _barkoder.getPowerSavingMode; print('Power saving mode: $powerSavingMode');
Dart return type: Future<int>.
setPowerSavingMode #
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:
| Parameter | Type | Description |
|---|---|---|
powerSavingMode | int | The power saving mode level to set. |
Example usage:
int powerSavingMode = 1; _barkoder.setPowerSavingMode(powerSavingMode); print('Power saving mode set to: $powerSavingMode');
Dart return type: Future<void>.
BarkoderView #
const BarkoderView({
Key? key,
required String licenseKey,
required void Function(Barkoder) onBarkoderViewCreated,
})
BarkoderView extends StatelessWidget and embeds the native scanner view.
| Parameter | Type | Description |
|---|---|---|
key | Key? | Optional inherited widget key. |
licenseKey | String | Required license key passed to the native configuration when creating the view. |
onBarkoderViewCreated | void Function(Barkoder) | Required callback invoked after the platform view is created, with the Dart controller. |
| Property | Type | Description |
|---|---|---|
licenseKey | String | Final constructor-supplied license key. |
onBarkoderViewCreated | void 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 #
Future <BarkoderResolution> getBarkoderResolution
Retrieves the resolution for barcode scanning.
returns a Future<BarkoderResolution> that completes with a BarkoderResolution enum value.
Example usage:
BarkoderResolution resolution = await _barkoder.getBarkoderResolution;
Dart return type: Future<BarkoderResolution>.
setFlashEnabled #
Future setFlashEnabled(bool enabled)
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool |
Enables or disables the device's flash (torch) for illumination during barcode scanning
enabled: A boolean indicating whether to enable the flash.
Example usage:
bool flashEnabled =true; await _barkoder.setFlashEnabled(flashEnabled); print('Flash enabled:$flashEnabled');
Dart return type: Future<void>.
setZoomFactor #
Future setZoomFactor(double zoomFactor)
Sets the zoom factor for the device's camera, adjusting the level of zoom during barcode scanning
Parameters:
| Parameter | Type | Description |
|---|---|---|
zoomFactor | double | The zoom factor to set. |
Example usage:
double zoom = 2.0; await _barkoder.setZoomFactor(zoom); print('Zoom factor set to:$zoom');
Dart return type: Future<void>.
setLocationInPreviewEnabled #
Future<void> setLocationInPreviewEnabled( bool enabled)
Sets whether location in preview is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable location in preview. |
Example usage:
bool locationInPreviewEnabled =true; _barkoder.setLocationInPreviewEnabled(locationInPreviewEnabled); print('Location in preview enabled:$locationInPreviewEnabled');
Dart return type: Future<void>.
setPinchToZoomEnabled #
Future<void> setPinchToZoomEnabled(bool enabled)
Sets whether pinch to zoom is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable pinch to zoom. |
Example usage:
bool pinchToZoomEnabled =true; _barkoder.setPinchToZoomEnabled(pinchToZoomEnabled); print('Pinch to zoom enabled:$pinchToZoomEnabled');
Dart return type: Future<void>.
setBarkoderResolution #
Future<void> setBarkoderResolution(BarkoderResolution resolution)
Sets the resolution for barcode scanning.
Parameters:
| Parameter | Type | Description |
|---|---|---|
resolution | BarkoderResolution | The BarkoderResolution enum value to set. |
Example usage:
BarkoderResolution resolution = BarkoderResolution.HD; await _barkoder.setBarkoderResolution(resolution); print('Barkoder resolution set to:$resolution');
Dart return type: Future<void>.
getMaxZoomFactor #
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:
double maxZoom =await _barkoder.getMaxZoomFactor(); print('Maximum zoom factor:$maxZoom');
Dart return type: Future<double>.
isFlashAvailable #
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:
bool flashAvailable =await _barkoder.isFlashAvailable(); print('Flash available:$flashAvailable');
Dart return type: Future<bool>.
isLocationInPreviewEnabled #
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:
bool locationInPreviewEnabled =await _barkoder.isLocationInPreviewEnabled; print('Location in preview enabled:$locationInPreviewEnabled');
Dart return type: Future<bool>.
isPinchToZoomEnabled #
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:
bool pinchToZoomEnabled =await _barkoder.isPinchToZoomEnabled; print('Pinch to zoom enabled:$pinchToZoomEnabled');
Dart return type: Future<bool>.
getCurrentZoomFactor #
Future getCurrentZoomFactor()
Retrieves the current zoom factor for the device's camera.
Returns a Future that completes with the current zoom factor.
Example usage:
double currentZoom = await _barkoder.getCurrentZoomFactor(); print('Current zoom factor: $currentZoom');
Dart return type: Future<double>.
startCamera #
Future startCamera()
Starts the camera.
Example usage:
await _barkoder.startCamera(); print('Camera started successfully');
Dart return type: Future<void>.
setCentricFocusAndExposure #
Future setCentricFocusAndExposure(bool value)
Sets the camera to use the center of the viewfinder for focus and exposure.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether the center of the viewfinder should be used. |
Example usage:
bool value = true; _barkoder.setCentricFocusAndExposure(value); print('Centric focus and exposure: $value');
Dart return type: Future<void>.
setCamera #
Future setCamera(BarkoderCameraPosition value)
Sets the camera to be used for scanning (back/front).
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | BarkoderCameraPosition | The value which camera should be used. |
Example usage:
BarkoderCameraPosition cameraPosition = BarkoderCameraPosition.BACK; _barkoder.setCamera(cameraPosition); print('Barkoder camera position set to: $cameraPosition');
Dart return type: Future<void>.
setPreviewMirrored #
Future setPreviewMirrored(bool mirrored)
Controls whether the front camera preview is horizontally mirrored.
Parameters:
| Parameter | Type | Description |
|---|---|---|
mirrored | bool | A boolean indicating whether to mirror the front camera preview. |
Example usage:
bool mirrored = true; await _barkoder.setPreviewMirrored(mirrored); print('Preview mirrored: $mirrored');
Dart return type: Future<void>.
isPreviewMirrored #
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:
bool mirrored = await _barkoder.isPreviewMirrored(); print('Preview mirrored: $mirrored');
Dart return type: Future<bool>.
Barcode types #
setEncodingCharacterSet #
Future<void> setEncodingCharacterSet(String characterSet)
Sets the encoding character set for barcode scanning
Parameters:
| Parameter | Type | Description |
|---|---|---|
characterSet | String | The encoding character set to set. |
Example usage:
String characterSet = 'utf-8'; _barkoder.setEncodingCharacterSet(characterSet); print('Encoding character set set to:$characterSet');
Dart return type: Future<void>.
getEncodingCharacterSet #
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:
String characterSet =await _barkoder.getEncodingCharacterSet; print('Encoding character set:$characterSet');
Dart return type: Future<String>.
getFormattingType #
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:
FormattingType type =await _barkoder.getFormattingType; print('Formatting type:$type');
Dart return type: Future<FormattingType>.
getMsiChecksumType #
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:
MsiChecksumType checksumType =await _barkoder.getMsiChecksumType; print('MSI checksum type:$checksumType');
Dart return type: Future<MsiChecksumType>.
getCode11ChecksumType #
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:
Code11ChecksumType checksumType =await _barkoder.getCode11ChecksumType; print('Code11 checksum type:$checksumType');
Dart return type: Future<Code11ChecksumType>.
getCode39ChecksumType #
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:
Code39ChecksumType checksumType =await _barkoder.getCode39ChecksumType; print('Code39 checksum type:$checksumType');
Dart return type: Future<Code39ChecksumType>.
setFormattingType #
Future<void> setFormattingType(FormattingType formattingType)
Sets the formatting type for barcode scanning.
Parameters:
| Parameter | Type | Description |
|---|---|---|
formattingType | FormattingType | The FormattingType to set. |
Example usage:
FormattingType type = FormattingType.gs1; _barkoder.setFormattingType(type); print('Formatting type set to:$type');
Dart return type: Future<void>.
setMsiChecksumType #
Future<void> setMsiChecksumType(MsiChecksumType checksumType)
Sets the MSI checksum type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
checksumType | MsiChecksumType | The MsiChecksumType to set. |
Example usage:
MsiChecksumType checksumType = MsiChecksumType.mod10; await _barkoder.setMsiChecksumType(checksumType); print('MSI checksum type set to:$checksumType');
Dart return type: Future<void>.
setCode39ChecksumType #
Future<void> setCode39ChecksumType(Code39ChecksumType checksumType)
Sets the Code39 checksum type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
checksumType | Code39ChecksumType | The Code39ChecksumType to set. |
Example usage:
Code39ChecksumType checksumType = Code39ChecksumType.enabled; _barkoder.setCode39ChecksumType(checksumType); print('Code39 checksum type set to:$checksumType');
Dart return type: Future<void>.
setCode11ChecksumType #
Future<void> setCode11ChecksumType(Code11ChecksumType checksumType)
Sets the Code11 checksum type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
checksumType | Code11ChecksumType | The Code11ChecksumType to set. |
Example usage:
Code11ChecksumType checksumType = Code11ChecksumType.single; await _barkoder.setCode11ChecksumType(checksumType); print('Code11 checksum type set to:$checksumType');
Dart return type: Future<void>.
isBarcodeTypeEnabled #
Future<bool> isBarcodeTypeEnabled(BarcodeType type)
Checks if a specific barcode type is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
type | BarcodeType | The BarcodeType to check. |
Returns a Future that completes with a boolean indicating whether the specified barcode type is enabled.
Example usage:
BarcodeType type = BarcodeType.code128; bool isEnabled =await _barkoder.isBarcodeTypeEnabled(type); print('Barcode type$type is enabled:$isEnabled');
Dart return type: Future<bool>.
setBarcodeTypeEnabled #
Future<void> setBarcodeTypeEnabled(BarcodeType type, bool enabled)
Sets whether a specific barcode type is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
type | BarcodeType | The BarcodeType to enable or disable. |
enabled | bool | A boolean indicating whether to enable or disable the specified barcode type. |
Example usage:
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 #
Future<List<int>> getBarcodeTypeLengthRange(BarcodeType type)
Retrieves the length range of a specific barcode type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
type | BarcodeType | The 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:
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 #
Future<void> setBarcodeTypeLengthRange(BarcodeType type, int min, int max)
Sets the length range for the specified barcode type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
type | BarcodeType | The BarcodeType to set the length range for. |
min | int | The minimum length for the barcode type. |
max | int | The maximum length for the barcode type. |
Example usage:
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 #
Future<void> setDatamatrixDpmModeEnabled(bool enabled)
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool |
Sets whether the Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.
Dart return type: Future<void>.
setUpcEanDeblurEnabled #
Future<void> setUpcEanDeblurEnabled(bool enabled)
Sets whether the deblurring feature for UPC/EAN barcodes is enabled
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable UPC/EAN deblur. |
Example usage:
bool isEnabled =true; await _barkoder.setUpcEanDeblurEnabled(isEnabled); print('UPC/EAN deblur enabled set to:$isEnabled');
Dart return type: Future<void>.
isUpcEanDeblurEnabled #
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:
bool isEnabled =await _barkoder.isUpcEanDeblurEnabled; print('UPC/EAN deblur enabled:$isEnabled');
Dart return type: Future<bool>.
isMisshaped1DEnabled #
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:
bool isEnabled =await _barkoder.isMisshaped1DEnabled; print('Misshaped 1D barcodes enabled:$isEnabled');
Dart return type: Future<bool>.
isVINRestrictionsEnabled #
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:
bool isEnabled =await _barkoder.isVINRestrictionsEnabled; print('VIN restrictions enabled:$isEnabled');
Dart return type: Future<bool>.
setEnableVINRestrictions #
Future<void> setEnableVINRestrictions(bool enabled)
Sets whether Vehicle Identification Number (VIN) restrictions are enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable VIN restrictions. |
Example usage:
bool isEnabled =true; _barkoder.setEnableVINRestrictions(isEnabled); print('VIN restrictions enabled set to:$isEnabled');
Dart return type: Future<void>.
setMisshaped1DEnabled #
Future setMisshaped1DEnabled(bool enabled)
Sets whether the detection of misshaped 1D barcodes is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable misshaped 1D barcodes. |
Example usage:
bool isEnabled = true; _barkoder.setMisshaped1DEnabled(isEnabled); print('Misshaped 1D barcodes enabled set to: $isEnabled');
Dart return type: Future<void>.
isDatamatrixDpmModeEnabled #
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:
bool isEnabled = await _barkoder.isDatamatrixDpmModeEnabled; print('DPM mode for Datamatrix barcodes enabled: $isEnabled');
Dart return type: Future<bool>.
isQrDpmModeEnabled #
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:
bool isEnabled = await _barkoder.isQrDpmModeEnabled; print('DPM mode for QR barcodes enabled: $isEnabled');
Dart return type: Future<bool>.
setQrDpmModeEnabled #
Future setQrDpmModeEnabled(bool enabled)
Sets whether the Direct Part Marking (DPM) mode for QR barcodes is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable DPM mode. |
Example usage:
bool isEnabled = true; _barkoder.setQrDpmModeEnabled(isEnabled); print('QR DPM mode enabled set to: $isEnabled');
Dart return type: Future<void>.
isQrMultiPartMergeEnabled #
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:
bool isEnabled = await _barkoder.isQrMultiPartMergeEnabled; print('QR multi-part merge mode enabled: $isEnabled');
Dart return type: Future<bool>.
setQrMultiPartMergeEnabled #
Future setQrMultiPartMergeEnabled(bool enabled)
Sets whether the QR multi-part merge mode is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable multi-part merge mode. |
Example usage:
bool isEnabled = true; _barkoder.setQrMultiPartMergeEnabled(isEnabled); print('QR multi-part merge mode enabled set to: $isEnabled');
Dart return type: Future<void>.
isQrMicroDpmModeEnabled #
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:
bool isEnabled = await _barkoder.isQrMicroDpmModeEnabled; print('DPM mode for QR Micro barcodes enabled: $isEnabled');
Dart return type: Future<bool>.
setQrMicroDpmModeEnabled #
Future setQrMicroDpmModeEnabled(bool enabled)
Sets whether the Direct Part Marking (DPM) mode for QR Micro barcodes is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable DPM mode. |
Example usage:
bool isEnabled = true; _barkoder.setQrMicroDpmModeEnabled(isEnabled); print('QR Micro DPM mode enabled set to: $isEnabled');
Dart return type: Future<void>.
isIdDocumentMasterChecksumEnabled #
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:
bool isEnabled = await _barkoder.isIdDocumentMasterChecksumEnabled; print('ID Documents master checksum is required(enabled): $isEnabled');
Dart return type: Future<bool>.
setIdDocumentMasterChecksumEnabled #
Future setIdDocumentMasterChecksumEnabled(bool enabled)
Sets whether Master checksum should be required when scanning ID Documents.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable or disable Master checksum. |
Example usage:
bool isEnabled = true; _barkoder.setIdDocumentMasterChecksumEnabled(isEnabled); print('Master checksum enabled set to: $isEnabled');
Dart return type: Future<void>.
setCustomOption #
Future setCustomOption(String option, int value)
Setting a custom option.
See more details about available options and their values.
Parameters:
| Parameter | Type | Description |
|---|---|---|
option | String | A string value for the option key. |
value | int | An integer value for the option. |
Example usage:
_barkoder.setCustomOption('optionKey', 1); print('Custom option set.');
Dart return type: Future<void>.
setEnableComposite #
Future setEnableComposite(int value)
Sets whether Composite Mode should be enabled when scanning.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | int | The integer value if composite mode should be enabled. |
Example usage:
int value = 1; _barkoder.setEnableComposite(value); print('Enable composite: $value');
Dart return type: Future<void>.
Results #
setCloseSessionOnResultEnabled #
Future<void> setCloseSessionOnResultEnabled(bool enabled)
Enables or disables the automatic closing of the scanning session upon detecting a barcode result
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable closing the session on result. |
Example usage:
bool closeSessionEnabled =true; _barkoder.setCloseSessionOnResultEnabled(closeSessionEnabled); print('Close session on result enabled:$closeSessionEnabled');
Dart return type: Future<void>.
setImageResultEnabled #
Future<void> setImageResultEnabled(bool enabled)
Enables or disables the capturing and processing of image data when a barcode is successfully detected.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable image result. |
Example usage:
bool imageResultEnabled =true; _barkoder.setImageResultEnabled(imageResultEnabled); print('Image result enabled:$imageResultEnabled');
Dart return type: Future<void>.
setBeepOnSuccessEnabled #
Future<void> setBeepOnSuccessEnabled(bool enabled)
Enables or disables the audible beep sound upon successfully decoding a barcode
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable beep on success. |
Example usage:
bool beepOnSuccessEnabled =true; await _barkoder.setBeepOnSuccessEnabled(beepOnSuccessEnabled); print('Beep on success enabled:$beepOnSuccessEnabled');
Dart return type: Future<void>.
setVibrateOnSuccessEnabled #
Future<void> setVibrateOnSuccessEnabled(bool enabled)
Enables or disables the device vibration upon successfully decoding a barcode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable vibrate on success. |
Example usage:
bool vibrateOnSuccessEnabled =true; await _barkoder.setVibrateOnSuccessEnabled(vibrateOnSuccessEnabled); print('Vibrate on success enabled:$vibrateOnSuccessEnabled');
Dart return type: Future<void>.
setReturnOnlyMatchedResults #
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:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether only matched results should be returned. |
Example usage:
bool value = true; _barkoder.setReturnOnlyMatchedResults(value); print('Return only matched results: $value');
Dart return type: Future<void>.
getReturnOnlyMatchedResults #
Future getReturnOnlyMatchedResults()
Retrieves whether only results matching the configured match filter are returned.
Returns a Future that completes with a boolean value.
Example usage:
bool value = await _barkoder.getReturnOnlyMatchedResults(); print('Return only matched results: $value');
Dart return type: Future<bool>.
isCloseSessionOnResultEnabled #
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:
bool closeSessionEnabled =await _barkoder.isCloseSessionOnResultEnabled; print('Close session on result enabled:$closeSessionEnabled');
Dart return type: Future<bool>.
isBeepOnSuccessEnabled #
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:
bool beepOnSuccessEnabled =await _barkoder.isBeepOnSuccessEnabled; print('Beep on success enabled:$beepOnSuccessEnabled');
Dart return type: Future<bool>.
isImageResultEnabled #
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:
bool imageResultEnabled =await _barkoder.isImageResultEnabled; print('Image result enabled:$imageResultEnabled');
Dart return type: Future<bool>.
setThresholdBetweenDuplicatesScans #
Future<void> setThresholdBetweenDuplicatesScans(int thresholdBetweenDuplicatesScans)
Sets the threshold between duplicate scans.
Parameters:
| Parameter | Type | Description |
|---|---|---|
thresholdBetweenDuplicatesScans | int | An integer representing the threshold in seconds between duplicate scans. |
Example usage:
int threshold = 1;// 100 milliseconds
_barkoder.setThresholdBetweenDuplicatesScans(threshold); print('Threshold between duplicate scans set to:$threshold milliseconds');
Dart return type: Future<void>.
getThresholdBetweenDuplicatesScans #
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:
int threshold =await _barkoder.getThresholdBetweenDuplicatesScans; print('Threshold between duplicate scans:$threshold milliseconds');
Dart return type: Future<int>.
setMaximumResultsCount #
Future setMaximumResultsCount(int maximumResultsCount)
Sets the maximum number of results to be returned from barcode scanning.
Parameters:
| Parameter | Type | Description |
|---|---|---|
maximumResultsCount | int | The maximum number of results to be returned. |
Example usage:
int maxResults = 10; await _barkoder.setMaximumResultsCount(maxResults); print('Maximum results count set to:$maxResults');
Dart return type: Future<void>.
setMulticodeCachingDuration #
Future<void> setMulticodeCachingDuration(int multicodeCachingDuration)
Sets the caching duration (in milliseconds) for multi-code results.
Parameters:
| Parameter | Type | Description |
|---|---|---|
multicodeCachingDuration | int | An integer representing the multicode caching duration in milliseconds. |
Example usage:
int cachingDuration = 5000;// 5 seconds
await _barkoder.setMulticodeCachingDuration(cachingDuration); print('Multicode caching duration set to:$cachingDuration');
Dart return type: Future<void>.
setMulticodeCachingEnabled #
Future<void> setMulticodeCachingEnabled(bool enabled)
Sets whether multi-code caching is enabled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable multicode caching. |
Example usage:
bool multicodeCachingEnabled =true; await _barkoder.setMulticodeCachingEnabled(multicodeCachingEnabled); print('Multicode caching enabled:$multicodeCachingEnabled');
Dart return type: Future<void>.
getMaximumResultsCount #
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:
double maxResults =await _barkoder.getMaximumResultsCount; print('Maximum results count:$maxResults');
Dart return type: Future<double>.
setBarcodeThumbnailOnResultEnabled #
Future<void> setBarcodeThumbnailOnResultEnabled(bool enabled)
Sets whether to enable barcode thumbnail on result.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable barcode thumbnail on result. |
Example usage:
bool thumbnailEnabled =true; await _barkoder.setBarcodeThumbnailOnResultEnabled(thumbnailEnabled); print('Barcode thumbnail on result enabled:$thumbnailEnabled');
Dart return type: Future<void>.
isBarcodeThumbnailOnResultEnabled #
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:
bool thumbnailEnabled =await _barkoder.isBarcodeThumbnailOnResultEnabled; print('Barcode thumbnail on result enabled:$thumbnailEnabled');
Dart return type: Future<bool>.
getMulticodeCachingEnabled #
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:
bool multicodeCachingEnabled =await _barkoder.getMulticodeCachingEnabled; print('Multicode caching enabled:$multicodeCachingEnabled');
Dart return type: Future<bool>.
getMulticodeCachingDuration #
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:
int cachingDuration =await _barkoder.getMulticodeCachingDuration; print('Multicode caching duration:$cachingDuration');
Dart return type: Future<int>.
captureImage #
Future captureImage()
Captures the latest camera frame.
Example usage:
await _barkoder.captureImage(); print('Image captured');
Dart return type: Future<void>.
scanImage #
Future scanImage(void Function(BarkoderResult) resultsCallback, String base64image)
Scan from base64 image string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
resultsCallback | void Function(BarkoderResult) | A function to handle the scanning results. |
base64image | String | The base64 encoded image string to scan. |
Example usage:
_barkoder.scanImage((result) { _updateState(result, false); }, base64ImageString); print('Scan image called');
Dart return type: Future<void>.
setShowDuplicatesLocations #
Future setShowDuplicatesLocations(bool value)
Enables or disables showing duplicate barcode locations on the preview overlay.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether to show duplicate barcode locations. |
Example usage:
_barkoder.setShowDuplicatesLocations(true);
Dart return type: Future<void>.
getShowDuplicatesLocations #
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:
bool showDuplicates = await _barkoder.getShowDuplicatesLocations(); print('Show duplicates locations: $showDuplicates');
Dart return type: Future<bool>.
isVibrateOnSuccessEnabled #
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:
_barkoder.isVibrateOnSuccessEnabled.then((enabled) {
print('Vibrate on success enabled: $enabled');
});
Region & overlay #
setRoiLineColor #
Future setRoiLineColor(String hexColor)
Sets the color of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed
Parameters:
| Parameter | Type | Description |
|---|---|---|
hexColor | String | The color to set for the ROI line in hexadecimal format. |
Example usage:
String lineColor = '#00FF00';// Green color
_barkoder.setRoiLineColor(lineColor); print('ROI line color set to:$lineColor');
Dart return type: Future<void>.
setRoiLineWidth #
Future setRoiLineWidth(double lineWidth)
Sets the width of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed
Parameters:
| Parameter | Type | Description |
|---|---|---|
lineWidth | double | The width to set for the ROI line. |
Example usage:
double lineWidth = 2.0; _barkoder.setRoiLineWidth(lineWidth); print('ROI line width set to:$lineWidth');
Dart return type: Future<void>.
setRoiOverlayBackgroundColor #
Future setRoiOverlayBackgroundColor(String hexColor)
Sets the background color of the region of interest (ROI) overlay.
Parameters:
| Parameter | Type | Description |
|---|---|---|
hexColor | String | 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');
Dart return type: Future<void>.
setLocationInImageResultEnabled #
Future<void> setLocationInImageResultEnabled(bool enabled)
Enables or disables the inclusion of barcode location information within the image data result.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | 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');
Dart return type: Future<void>.
setRegionOfInterestVisible #
Future<void> setRegionOfInterestVisible(bool visible)
Sets the visibility of the Region of Interest (ROI) on the camera preview.
Parameters:
| Parameter | Type | Description |
|---|---|---|
visible | bool | A boolean indicating whether to make the ROI visible. |
Example usage:
bool roiVisible =true; await _barkoder.setRegionOfInterestVisible(roiVisible); print('Region of interest set to visible:$roiVisible');
Dart return type: Future<void>.
setRegionOfInterest #
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:
| Parameter | Type | Description |
|---|---|---|
left | double | The left coordinate of the ROI. |
top | double | The top coordinate of the ROI. |
width | double | The width of the ROI in percentage. |
height | double | The height of the ROI in percentage. |
Example usage:
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 #
Future<void> setLocationLineWidth(double lineWidth)
Sets the width of the lines indicating the location of detected barcodes on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
lineWidth | double | The width to set for the location line. |
Example usage:
double lineWidth = 2.0; _barkoder.setLocationLineWidth(lineWidth); print('Location line width set to:$lineWidth');
Dart return type: Future<void>.
setLocationLineColor #
Future<void> setLocationLineColor(String hexColor)
Sets the color of the lines used to indicate the location of detected barcodes on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
hexColor | String | The color to set for the location line in hexadecimal format. |
Example usage:
String lineColor = '#FF0000';// Red color
_barkoder.setLocationLineColor(lineColor); print('Location line color set to:$lineColor');
Dart return type: Future<void>.
getLocationLineColorHex #
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:
String lineColor =await _barkoder.getLocationLineColorHex; print('Location line color:$lineColor');
Dart return type: Future<String>.
getLocationLineWidth #
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:
double lineWidth =await _barkoder.getLocationLineWidth; print('Location line width:$lineWidth');
Dart return type: Future<double>.
getRoiLineColorHex #
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:
String lineColor =await _barkoder.getRoiLineColorHex; print('ROI line color:$lineColor');
Dart return type: Future<String>.
getRoiLineWidth #
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:
double lineWidth =await _barkoder.getRoiLineWidth; print('ROI line width:$lineWidth');
Dart return type: Future<double>.
getRoiOverlayBackgroundColorHex #
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:
String backgroundColor =await _barkoder.getRoiOverlayBackgroundColorHex; print('ROI overlay background color:$backgroundColor');
Dart return type: Future<String>.
getRegionOfInterest #
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:
List roi =await _barkoder.getRegionOfInterest; print('Region of interest:$roi');
Dart return type: Future<List<double>>.
isLocationInImageResultEnabled #
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:
bool locationInImageResultEnabled =await _barkoder.isLocationInImageResultEnabled; print('Location in image result enabled:$locationInImageResultEnabled');
Dart return type: Future<bool>.
isRegionOfInterestVisible #
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:
bool roiVisible =await _barkoder.isRegionOfInterestVisible; print('Region of interest visible:$roiVisible');
Dart return type: Future<bool>.
setRoiCenterMark #
Future setRoiCenterMark(BarkoderRoiCenterMark roiCenterMark)
Sets the visual marker displayed at the center of the Region of Interest (ROI).
Parameters:
| Parameter | Type | Description |
|---|---|---|
roiCenterMark | BarkoderRoiCenterMark | The BarkoderRoiCenterMark value to set. |
Example usage:
BarkoderRoiCenterMark centerMark = BarkoderRoiCenterMark.crosshair; _barkoder.setRoiCenterMark(centerMark); print('ROI center mark set to: $centerMark');
Dart return type: Future<void>.
getRoiCenterMark #
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:
BarkoderRoiCenterMark centerMark = await _barkoder.getRoiCenterMark(); print('ROI center mark: $centerMark');
Dart return type: Future<BarkoderRoiCenterMark>.
getScanningIndicatorColorHex #
Future getScanningIndicatorColorHex
Retrieves the hexadecimal color code representing the line color of the scanning indicator on the camera preview.
Example usage:
String indicatorColor = await _barkoder.getScanningIndicatorColorHex; print('Scanning indicator color: $indicatorColor');
Dart return type: Future<String>.
setScanningIndicatorColor #
Future setScanningIndicatorColor(String hexColor)
Sets the color of the lines outlining the scanning indicator for barcode scanning on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
hexColor | String | The hexadecimal representation of the color. |
Example usage:
String indicatorColor = '#FF0000'; // Red color
_barkoder.setScanningIndicatorColor(indicatorColor); print('Scanning indicator color set to: $indicatorColor');
Dart return type: Future<void>.
getScanningIndicatorWidth #
Future getScanningIndicatorWidth
Retrieves the current width setting for the scanning indicator on the camera preview.
Example usage:
double indicatorWidth = await _barkoder.getScanningIndicatorWidth; print('Scanning indicator width: $indicatorWidth');
Dart return type: Future<double>.
setScanningIndicatorWidth #
Future setScanningIndicatorWidth(double lineWidth)
Sets the width of the scanning indicator for barcode scanning on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
lineWidth | double | The width of the scanning indicator to set. |
Example usage:
double indicatorWidth = 3.0; _barkoder.setScanningIndicatorWidth(indicatorWidth); print('Scanning indicator width set to: $indicatorWidth');
Dart return type: Future<void>.
getScanningIndicatorAnimation #
Future getScanningIndicatorAnimation
Retrieves the current animation setting for the scanning indicator on the camera preview.
Example usage:
int animation = await _barkoder.getScanningIndicatorAnimation; print('Scanning indicator animation: $animation');
Dart return type: Future<int>.
setScanningIndicatorAnimation #
Future setScanningIndicatorAnimation(int animation)
Sets the animation of the scanning indicator for barcode scanning on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
animation | int | The animation of the scanning indicator to set. |
Example usage:
int animation = 1; _barkoder.setScanningIndicatorAnimation(animation); print('Scanning indicator animation set to: $animation');
Dart return type: Future<void>.
isScanningIndicatorAlwaysVisible #
Future isScanningIndicatorAlwaysVisible
Retrieves if the scanning indicator is set to be always visible on the camera preview.
Example usage:
bool alwaysVisible = await _barkoder.isScanningIndicatorAlwaysVisible; print('Scanning indicator always visible: $alwaysVisible');
Dart return type: Future<bool>.
setScanningIndicatorAlwaysVisible #
Future setScanningIndicatorAlwaysVisible(bool value)
Sets the scanning indicator to be always shown on the camera feed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether the scanning indicator should always remain visible. |
Example usage:
bool alwaysVisible = true; _barkoder.setScanningIndicatorAlwaysVisible(alwaysVisible); print('Scanning indicator always visible: $alwaysVisible');
Dart return type: Future<void>.
AR mode #
setARMode #
Future setARMode(BarkoderARMode value)
Sets the AR mode used for barcode scanning visualization.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | BarkoderARMode | The AR mode to set. |
Example usage:
_barkoder.setARMode(BarkoderARMode.interactiveEnabled);
Dart return type: Future<void>.
setARResultDisappearanceDelayMs #
Future setARResultDisappearanceDelayMs(int value)
Sets the delay (in milliseconds) after which a detected AR result is considered expired and removed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | int | Delay duration in milliseconds. |
Example usage:
_barkoder.setARResultDisappearanceDelayMs(800);
Dart return type: Future<void>.
setARLocationTransitionSpeed #
Future setARLocationTransitionSpeed(double value)
Sets the speed at which barcode location overlays transition positions.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | The speed value. |
Example usage:
_barkoder.setARLocationTransitionSpeed(0.3);
Dart return type: Future<void>.
setAROverlayRefresh #
Future setAROverlayRefresh(BarkoderAROverlayRefresh value)
Sets the refresh mode for the AR overlay on the camera preview.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | BarkoderAROverlayRefresh | The AR overlay refresh mode to set. |
Example usage:
_barkoder.setAROverlayRefresh(BarkoderAROverlayRefresh.smooth);
Dart return type: Future<void>.
setARSelectedLocationColor #
Future setARSelectedLocationColor(String value)
Sets the color used for drawing the overlay around selected barcodes in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | String | The color in hexadecimal format. |
Example usage:
_barkoder.setARSelectedLocationColor('#00FF00');
Dart return type: Future<void>.
setARNonSelectedLocationColor #
Future setARNonSelectedLocationColor(String value)
Sets the color used for drawing the overlay around non-selected barcodes in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | String | The color in hexadecimal format. |
Example usage:
_barkoder.setARNonSelectedLocationColor('#FF0000');
Dart return type: Future<void>.
setARSelectedLocationLineWidth #
Future setARSelectedLocationLineWidth(double value)
Sets the line width of the overlay for selected barcodes in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | The width to set. |
Example usage:
_barkoder.setARSelectedLocationLineWidth(2.0);
Dart return type: Future<void>.
setARNonSelectedLocationLineWidth #
Future setARNonSelectedLocationLineWidth(double value)
Sets the line width of the overlay for non-selected barcodes in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | The width to set. |
Example usage:
_barkoder.setARNonSelectedLocationLineWidth(1.0);
Dart return type: Future<void>.
setARLocationType #
Future setARLocationType(BarkoderARLocationType value)
Sets the style of location overlays drawn around detected barcodes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | BarkoderARLocationType | The location type style to use. |
Example usage:
_barkoder.setARLocationType(BarkoderARLocationType.tight);
Dart return type: Future<void>.
setARDoubleTapToFreezeEnabled #
Future setARDoubleTapToFreezeEnabled(bool enabled)
Enables or disables the ability to freeze/unfreeze scanning via double-tap gesture in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | Whether to enable the double-tap freeze feature. |
Example usage:
_barkoder.setARDoubleTapToFreezeEnabled(true);
Dart return type: Future<void>.
setARImageResultEnabled #
Future setARImageResultEnabled(bool enabled)
Enables or disables the capturing and processing of image data when a barcode is selected for AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable image result. |
Example usage:
bool arImageResultEnabled = true; _barkoder.setARImageResultEnabled(arImageResultEnabled); print('AR Image result enabled: $arImageResultEnabled');
Dart return type: Future<void>.
setARBarcodeThumbnailOnResultEnabled #
Future setARBarcodeThumbnailOnResultEnabled(bool enabled)
Enables or disables the barcode thumbnail on result for AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
enabled | bool | A boolean indicating whether to enable barcode thumbnail on result. |
Example usage:
bool arThumbnailEnabled = true; _barkoder.setARBarcodeThumbnailOnResultEnabled(arThumbnailEnabled); print('AR Barcode thumbnail on result enabled: $arThumbnailEnabled');
Dart return type: Future<void>.
setARResultLimit #
Future setARResultLimit(int value)
Sets the maximum number of results allowed in a single AR scanning session.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | int | The maximum number of results. |
Example usage:
_barkoder.setARResultLimit(5);
Dart return type: Future<void>.
setARContinueScanningOnLimit #
Future setARContinueScanningOnLimit(bool value)
Sets whether scanning continues when the result limit is reached (only in .interactiveDisabled mode).
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether to continue scanning. |
Example usage:
_barkoder.setARContinueScanningOnLimit(true);
Dart return type: Future<void>.
setAREmitResultsAtSessionEndOnly #
Future setAREmitResultsAtSessionEndOnly(bool value)
Sets whether results are emitted only at AR session end (or when the limit is reached).
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether results are emitted only at the end of the session. |
Example usage:
_barkoder.setAREmitResultsAtSessionEndOnly(true);
Dart return type: Future<void>.
setARHeaderHeight #
Future setARHeaderHeight(double value)
Sets the height of the header text label shown above the barcode in AR mode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | Header height. |
Example usage:
_barkoder.setARHeaderHeight(24.0);
Dart return type: Future<void>.
setARHeaderShowMode #
Future setARHeaderShowMode(BarkoderARHeaderShowMode value)
Sets the condition under which the header text is shown above the barcode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | BarkoderARHeaderShowMode | The display mode for the AR header. |
Example usage:
_barkoder.setARHeaderShowMode(BarkoderARHeaderShowMode.onSelected);
Dart return type: Future<void>.
setARHeaderMaxTextHeight #
Future setARHeaderMaxTextHeight(double value)
Sets the maximum text height used for rendering AR header text.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | Maximum height. |
Example usage:
_barkoder.setARHeaderMaxTextHeight(22.0);
Dart return type: Future<void>.
setARHeaderMinTextHeight #
Future setARHeaderMinTextHeight(double value)
Sets the minimum text height used for rendering AR header text.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | Minimum height. |
Example usage:
_barkoder.setARHeaderMinTextHeight(12.0);
Dart return type: Future<void>.
setARHeaderTextColorSelected #
Future setARHeaderTextColorSelected(String value)
Sets the text color of the header when the barcode is in a selected state.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | String | The color in hexadecimal format. |
Example usage:
_barkoder.setARHeaderTextColorSelected('#FFFFFF');
Dart return type: Future<void>.
setARHeaderTextColorNonSelected #
Future setARHeaderTextColorNonSelected(String value)
Sets the text color of the header when the barcode is not selected.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | String | The color in hexadecimal format. |
Example usage:
_barkoder.setARHeaderTextColorNonSelected('#AAAAAA');
Dart return type: Future<void>.
setARHeaderHorizontalTextMargin #
Future setARHeaderHorizontalTextMargin(double value)
Sets the horizontal margin applied to the header text in AR mode, creating equal padding on both sides.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | Horizontal margin. |
Example usage:
_barkoder.setARHeaderHorizontalTextMargin(8.0);
Dart return type: Future<void>.
setARHeaderVerticalTextMargin #
Future setARHeaderVerticalTextMargin(double value)
Sets the vertical margin applied to the header text in AR mode, creating equal padding on both sides.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | double | Vertical margin. |
Example usage:
_barkoder.setARHeaderVerticalTextMargin(4.0);
Dart return type: Future<void>.
setARHeaderTextFormat #
Future setARHeaderTextFormat(String value)
Sets the format string for the AR header text above each barcode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | String | Format string with placeholders (e.g., [barcode_text]). |
Example usage:
_barkoder.setARHeaderTextFormat('[barcode_text] - [barcode_type]');
Dart return type: Future<void>.
resetARCache #
Future resetARCache()
Clears all cached barcode results from the current AR scanning session.
Example usage:
await _barkoder.resetARCache(); print('AR cache reset');
Dart return type: Future<void>.
getARMode #
Future getARMode()
Retrieves the current AR mode used for barcode scanning.
Returns a Future that completes with a BarkoderARMode value.
Example usage:
BarkoderARMode mode = await _barkoder.getARMode(); print('Current AR Mode: $mode');
Dart return type: Future<BarkoderARMode>.
setARReturnOnlyMatchedResults #
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:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether only matched results should be returned. |
Example usage:
bool value = true; _barkoder.setARReturnOnlyMatchedResults(value); print('AR return only matched results: $value');
Dart return type: Future<void>.
getARReturnOnlyMatchedResults #
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:
bool value = await _barkoder.getARReturnOnlyMatchedResults(); print('AR return only matched results: $value');
Dart return type: Future<bool>.
setARDisplayOnlyMatchedResults #
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:
| Parameter | Type | Description |
|---|---|---|
value | bool | A boolean indicating whether only matched results should be displayed. |
Example usage:
bool value = true; _barkoder.setARDisplayOnlyMatchedResults(value); print('AR display only matched results: $value');
Dart return type: Future<void>.
getARDisplayOnlyMatchedResults #
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:
bool value = await _barkoder.getARDisplayOnlyMatchedResults(); print('AR display only matched results: $value');
Dart return type: Future<bool>.
getARResultDisappearanceDelayMs #
Future getARResultDisappearanceDelayMs()
Retrieves the delay after which AR results disappear once detected.
Returns a Future that completes with an int value.
Example usage:
int delay = await _barkoder.getARResultDisappearanceDelayMs(); print('AR result disappearance delay: $delay ms');
Dart return type: Future<int>.
getARLocationTransitionSpeed #
Future getARLocationTransitionSpeed()
Retrieves the transition speed for AR barcode location overlays.
Returns a Future that completes with a double value.
Example usage:
double speed = await _barkoder.getARLocationTransitionSpeed(); print('AR transition speed: $speed');
Dart return type: Future<double>.
getAROverlayRefresh #
Future getAROverlayRefresh()
Retrieves the AR overlay refresh mode.
Returns a Future that completes with a BarkoderAROverlayRefresh enum value.
Example usage:
var mode = await _barkoder.getAROverlayRefresh(); print('AR overlay refresh mode: $mode');
Dart return type: Future<BarkoderAROverlayRefresh>.
getARSelectedLocationColor #
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:
String color = await _barkoder.getARSelectedLocationColor(); print('Selected location color: $color');
Dart return type: Future<String>.
getARNonSelectedLocationColor #
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:
String color = await _barkoder.getARNonSelectedLocationColor(); print('Non-selected location color: $color');
Dart return type: Future<String>.
getARSelectedLocationLineWidth #
Future getARSelectedLocationLineWidth()
Retrieves the line width for selected barcode overlays in AR mode.
Returns a Future that completes with a double value.
Example usage:
double width = await _barkoder.getARSelectedLocationLineWidth(); print('Selected line width: $width');
Dart return type: Future<double>.
getARNonSelectedLocationLineWidth #
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:
double width = await _barkoder.getARNonSelectedLocationLineWidth(); print('Non-selected line width: $width');
Dart return type: Future<double>.
getARLocationType #
Future getARLocationType()
Retrieves the style of AR location overlays (tight, bounding box, none).
Returns a Future that completes with a BarkoderARLocationType value.
Example usage:
var type = await _barkoder.getARLocationType(); print('AR location type: $type');
Dart return type: Future<BarkoderARLocationType>.
isARDoubleTapToFreezeEnabled #
Future isARDoubleTapToFreezeEnabled()
Checks whether double-tap to freeze is enabled in AR mode.
Returns a Future that completes with a bool value.
Example usage:
bool enabled = await _barkoder.isARDoubleTapToFreezeEnabled(); print('Double tap to freeze: $enabled');
Dart return type: Future<bool>.
isARImageResultEnabled #
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:
bool arImageResultEnabled = await _barkoder.isARImageResultEnabled; print('AR Image result enabled: $arImageResultEnabled');
Dart return type: Future<bool>.
isARBarcodeThumbnailOnResultEnabled #
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:
bool arThumbnailEnabled = await _barkoder.isARBarcodeThumbnailOnResultEnabled; print('AR Barcode thumbnail on result enabled: $arThumbnailEnabled');
Dart return type: Future<bool>.
getARResultLimit #
Future getARResultLimit
Retrieves the maximum number of results allowed in a single AR scanning session.
Example usage:
int resultLimit = await _barkoder.getARResultLimit;
Dart return type: Future<int>.
getARContinueScanningOnLimit #
Future getARContinueScanningOnLimit
Retrieves whether scanning continues when the result limit is reached (only in .interactiveDisabled mode).
Example usage:
bool continueScanning = await _barkoder.getARContinueScanningOnLimit;
Dart return type: Future<bool>.
getAREmitResultsAtSessionEndOnly #
Future getAREmitResultsAtSessionEndOnly
Retrieves whether results are emitted only at AR session end (or when the limit is reached).
Example usage:
bool emitAtEnd = await _barkoder.getAREmitResultsAtSessionEndOnly;
Dart return type: Future<bool>.
getARHeaderHeight #
Future getARHeaderHeight()
Retrieves the header height above barcode in AR mode.
Returns a Future that completes with a double value.
Example usage:
double height = await _barkoder.getARHeaderHeight(); print('AR header height: $height');
Dart return type: Future<double>.
getARHeaderShowMode #
Future getARHeaderShowMode()
Retrieves the header display mode (always, on selected, never).
Returns a Future that completes with a BarkoderARHeaderShowMode value.
Example usage:
var mode = await _barkoder.getARHeaderShowMode(); print('AR header show mode: $mode');
Dart return type: Future<BarkoderARHeaderShowMode>.
getARHeaderMaxTextHeight #
Future getARHeaderMaxTextHeight()
Retrieves the maximum text height for AR headers.
Returns a Future that completes with a double value.
Example usage:
double maxHeight = await _barkoder.getARHeaderMaxTextHeight(); print('Max text height: $maxHeight');
Dart return type: Future<double>.
getARHeaderMinTextHeight #
Future getARHeaderMinTextHeight()
Retrieves the minimum text height for AR headers.
Returns a Future that completes with a double value.
Example usage:
double minHeight = await _barkoder.getARHeaderMinTextHeight(); print('Min text height: $minHeight');
Dart return type: Future<double>.
getARHeaderTextColorSelected #
Future getARHeaderTextColorSelected()
Retrieves the header text color for selected barcodes.
Returns a Future that completes with a String hex color.
Example usage:
String color = await _barkoder.getARHeaderTextColorSelected(); print('Header selected text color: $color');
Dart return type: Future<String>.
getARHeaderTextColorNonSelected #
Future getARHeaderTextColorNonSelected()
Retrieves the header text color for non-selected barcodes.
Returns a Future that completes with a String hex color.
Example usage:
String color = await _barkoder.getARHeaderTextColorNonSelected(); print('Header non-selected text color: $color');
Dart return type: Future<String>.
getARHeaderHorizontalTextMargin #
Future getARHeaderHorizontalTextMargin()
Retrieves the horizontal margin for AR header text.
Returns a Future that completes with a double value.
Example usage:
double margin = await _barkoder.getARHeaderHorizontalTextMargin(); print('Header horizontal margin: $margin');
Dart return type: Future<double>.
getARHeaderVerticalTextMargin #
Future getARHeaderVerticalTextMargin()
Retrieves the vertical margin for AR header text.
Returns a Future that completes with a double value.
Example usage:
double margin = await _barkoder.getARHeaderVerticalTextMargin(); print('Header vertical margin: $margin');
Dart return type: Future<double>.
getARHeaderTextFormat #
Future getARHeaderTextFormat()
Retrieves the format string used for AR header text.
Returns a Future that completes with a String value.
Example usage:
String format = await _barkoder.getARHeaderTextFormat(); print('Header text format: $format');
Dart return type: Future<String>.
On-screen buttons #
onCloseButtonTapped #
void onCloseButtonTapped(VoidCallback handler)
Registers a callback to handle the SDK Close button tap event during scanning (configured via configureCloseButton).
Parameters:
| Parameter | Type | Description |
|---|---|---|
handler | VoidCallback | Function to execute when the SDK Close button is pressed. |
Example usage:
_barkoder.onCloseButtonTapped(() { print('Close button tapped'); });
Dart return type: void.
configureCloseButton #
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:
| Parameter | Type | Description |
|---|---|---|
visible | bool | Required named argument. Show the button while scanning. |
positionX | double | Required named argument. X position in points. |
positionY | double | Required named argument. Y position in points. |
iconSize | double | Required named argument. Glyph point size. |
tintColor | String | Required named argument. Icon tint as a hex string; leave "" to use the default. |
backgroundColor | String | Required named argument. Button background as a hex string; leave "" for default (clear). |
cornerRadius | double | Required named argument. Corner radius. |
padding | double | Required named argument. Inner padding around the glyph. |
useCustomIcon | bool | Required named argument. Set true to use the provided custom icon. |
customIcon | String | Required named argument. Custom icon as a Base64-encoded image string. |
Dart return type: Future<void>.
configureFlashButton #
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:
| Parameter | Type | Description |
|---|---|---|
visible | bool | Required named argument. Show the button while scanning. |
positionX | double | Required named argument. X position in points. |
positionY | double | Required named argument. Y position in points. |
iconSize | double | Required named argument. Glyph point size. |
tintColor | String | Required named argument. Icon tint as a hex string; leave "" to use the default. |
backgroundColor | String | Required named argument. Button background as a hex string; leave "" for default (clear). |
cornerRadius | double | Required named argument. Corner radius. |
padding | double | Required named argument. Inner padding around the glyph. |
useCustomIcon | bool | Required named argument. Set true to use the provided custom icons. |
customIconFlashOn | String | Required named argument. ON-state icon as a Base64-encoded image string. |
customIconFlashOff | String | Required named argument. OFF-state icon as a Base64-encoded image string. |
Dart return type: Future<void>.
configureZoomButton #
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:
| Parameter | Type | Description |
|---|---|---|
visible | bool | Required named argument. Show the button while scanning. |
positionX | double | Required named argument. X position in points. |
positionY | double | Required named argument. Y position in points. |
iconSize | double | Required named argument. Glyph point size. |
tintColor | String | Required named argument. Icon tint as a hex string; leave "" to use the default. |
backgroundColor | String | Required named argument. Button background as a hex string; leave "" for default (clear). |
cornerRadius | double | Required named argument. Corner radius. |
padding | double | Required named argument. Inner padding around the glyph. |
useCustomIcon | bool | Required named argument. Set true to use the provided custom icons. |
customIconZoomedIn | String | Required named argument. Zoomed-in state icon as a Base64-encoded image string. |
customIconZoomedOut | String | Required named argument. Zoomed-out state icon as a Base64-encoded image string. |
zoomedInFactor | double | Required named argument. Zoom factor to apply when toggled in (e.g., 2.0). |
zoomedOutFactor | double | Required 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 #
BarkoderResult({
required List<DecoderResult> decoderResults,
List<Uint8List>? resultThumbnails,
Uint8List? resultImage,
})
| Property | Type | Description |
|---|---|---|
decoderResults | List<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 #
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,
})
| Property | Type | Description |
|---|---|---|
barcodeType | int | Native barcode-type identifier, not a Dart BarcodeType enum. |
barcodeTypeName | String | Barcode-type name supplied by the decoder. |
binaryDataAsBase64 | String | Barcode binary data as a Base64 string; use base64Decode if bytes are needed. |
textualData | String | Decoded barcode text. |
isMatched | bool | Whether 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 #
MRZImage({required String name, required Uint8List value})
| Property | Type | Description |
|---|---|---|
name | String | Final image-descriptor name. The native result bridges include main, document, signature, and picture when available; not every MRZ result contains every image. |
value | Uint8List | Final image bytes, decoded from the raw descriptor's base64 string. The raw bridge key is base64; the Dart property is value. |
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.
| Member | Value |
|---|---|
aztec | 0 |
aztecCompact | 1 |
qr | 2 |
qrMicro | 3 |
code128 | 4 |
code93 | 5 |
code39 | 6 |
codabar | 7 |
code11 | 8 |
msi | 9 |
upcA | 10 |
upcE | 11 |
upcE1 | 12 |
ean13 | 13 |
ean8 | 14 |
pdf417 | 15 |
pdf417Micro | 16 |
datamatrix | 17 |
code25 | 18 |
interleaved25 | 19 |
itf14 | 20 |
iata25 | 21 |
matrix25 | 22 |
datalogic25 | 23 |
coop25 | 24 |
code32 | 25 |
telepen | 26 |
dotcode | 27 |
idDocument | 28 |
databar14 | 29 |
databarLimited | 30 |
databarExpanded | 31 |
postalIMB | 32 |
postnet | 33 |
planet | 34 |
australianPost | 35 |
royalMail | 36 |
kix | 37 |
japanesePost | 38 |
maxiCode | 39 |
ocrText | 40 |
FormattingType #
Used by setFormattingType and getFormattingType.
| Member | Value |
|---|---|
disabled | 0 |
automatic | 1 |
gs1 | 2 |
aamva | 3 |
sadl | 4 |
bcbp | 5 |
MsiChecksumType #
Used by setMsiChecksumType and getMsiChecksumType.
| Member | Value |
|---|---|
disabled | 0 |
mod10 | 1 |
mod11 | 2 |
mod1010 | 3 |
mod1110 | 4 |
mod11IBM | 5 |
mod1110IBM | 6 |
Code39ChecksumType #
Used by setCode39ChecksumType and getCode39ChecksumType.
| Member | Value |
|---|---|
disabled | 0 |
enabled | 1 |
Code11ChecksumType #
Used by setCode11ChecksumType and getCode11ChecksumType.
| Member | Value |
|---|---|
disabled | 0 |
single | 1 |
double | 2 |
DecodingSpeed #
Used by setDecodingSpeed and getDecodingSpeed.
| Member | Value |
|---|---|
fast | 0 |
normal | 1 |
slow | 2 |
rigorous | 3 |
BarkoderCameraPosition #
Used by setCamera. Member names are uppercase.
| Member | Value |
|---|---|
BACK | 0 |
FRONT | 1 |
BarkoderResolution #
Used by setBarkoderResolution and getBarkoderResolution. Member names are uppercase.
| Member | Value |
|---|---|
HD | 0 |
FHD | 1 |
UHD | 2 |
BarkoderRoiCenterMark #
Used by setRoiCenterMark and getRoiCenterMark.
| Member | Value |
|---|---|
none | 0 |
crosshair | 1 |
point | 2 |
BarkoderARMode #
Used by setARMode and getARMode.
| Member | Value |
|---|---|
off | 0 |
interactiveDisabled | 1 |
interactiveEnabled | 2 |
nonInteractive | 3 |
matchFilter | 4 |
BarkoderAROverlayRefresh #
Used by setAROverlayRefresh and getAROverlayRefresh.
| Member | Value |
|---|---|
smooth | 0 |
normal | 1 |
BarkoderARLocationType #
Used by setARLocationType and getARLocationType.
| Member | Value |
|---|---|
none | 0 |
tight | 1 |
boundingBox | 2 |
BarkoderARHeaderShowMode #
Used by setARHeaderShowMode and getARHeaderShowMode.
| Member | Value |
|---|---|
never | 0 |
always | 1 |
onSelected | 2 |
IdDocumentMasterChecksumType #
Used by the public IdDocumentBarcodeConfig.masterChecksum property.
| Member | Value |
|---|---|
disabled | 0 |
enabled | 1 |