Skip to main content
Speed up SparkScan integration with Agent Skills

Install the Scandit plugin and use the /sparkscan-flutter skill so that your AI coding agent can integrate, debug, and customize SparkScan on Flutter following Scandit's recommended patterns. More info →

Run the following command in your project directory. It detects the supported coding agents you have installed and adds the Scandit plugin to each. Re-run it to update.

npx plugins add scandit/skills

Prefer to set it up yourself? Manual installation steps for each agent →

SparkScan settings reference

This page lists the SparkScan settings and view properties in Flutter, with their defaults and allowed values as the API reference states them. A blank default means the API reference states none. For what the workflow settings do for your users, see How SparkScan works.

Options​

SparkScanSettings​

SparkScanSettings holds the scanning settings, such as the enabled symbologies. To change them on a running scanner, pass them to SparkScan.applySettings().

NameTypeDefaultValuesWhat it does
SparkScanSettings({capturePresets})ConstructorSet<CapturePreset>?Creates settings, optionally from presets that enable the matching symbologies and optimizations. Presets added in 8.3.0.
codeDuplicateFilterDuration-2-2: depends on scanIntention. -1: not reported again until scanning stops. 0: no filtering. Greater than 0: the time before the same code is reported again.Filters out codes with the same symbology and data that are scanned again within the interval. If you keep the default and turn the selection mode On, SparkScan doesn't filter duplicates, so users can select the same barcode again.
enabledSymbologiesSet<Symbology>Empty: all symbologies are disabledRead-only. The enabled symbologies.
enableSymbology(symbology, enabled)MethodEnables or disables one symbology.
enableSymbologies(symbologies)MethodEnables a set of symbologies.
settingsForSymbology(symbology)MethodReturns the SymbologySettings of one symbology, for example to change its active symbol counts.
enabledCompositeTypesSet<CompositeType>The composite code types to scan. Added in 8.3.0.
enableSymbologiesForCompositeTypes(compositeTypes)MethodEnables the symbologies that the given composite types need. Added in 8.3.0.
batterySavingBatterySavingModeautoon, off, autoThe battery saving mode. auto turns it on when battery use is higher than usual.
scanIntentionScanIntentionsmartsmart, manualWhether SparkScan identifies the barcode the user intends to scan. It has no effect while selectionMode is on.
selectionModeSelectionModeautoauto, on, offWhether users confirm the aimed barcode with the trigger button. Added in 8.5.0.
itemDefinitionsList<ScanItemDefinition>?Configures the settings with the item-based scanning API. When set, enabledSymbologies is ignored. Beta. Added in 8.1.0.
setProperty(name, value)MethodSets a property that isn't part of the stable API yet.
getProperty(name)MethodReturns the value of a property set with setProperty().

SparkScanViewSettings​

SparkScanViewSettings sets the view's default look and behavior. Set them before you create the SparkScanView. Changes after that don't apply to the view.

NameTypeDefaultValuesWhat it does
scanningBehaviorSparkScanScanningBehaviorsinglesingle, continuousWhether users scan one barcode per trigger or keep scanning. Added in 8.7.0.
previewBehaviorSparkScanPreviewBehaviordefaultBehaviourdefaultBehaviour, persistentWhether the mini preview hides or stays visible when the scanner isn't scanning. Added in 8.7.0.
holdToScanEnabledbooltrueWhether users can keep scanning by holding the trigger button. Ignored while selectionMode is on.
triggerButtonCollapseTimeoutDuration5 secondsA negative value: neverThe time after which the trigger button collapses to its idle state.
inactiveStateTimeoutDuration10 secondsThe time after which scanning stops on its own.
defaultTorchStateTorchStateoffon, off, autoThe torch state when the camera starts.
defaultCameraPositionCameraPositionworldFacingworldFacing, userFacing, unspecifiedThe camera to start with. Beta.
defaultMiniPreviewSizeSparkScanMiniPreviewSizeregularregular, expandedThe size of the mini preview when it first shows.
zoomFactorOutdouble1The camera zoom factor.
zoomFactorIndouble2The zoom factor after users tap the zoom switch control.
soundEnabledbooltrueWhether the scan feedback plays a sound.
hapticEnabledbooltrueWhether the scan feedback vibrates.
visualFeedbackEnabledbooltrueWhether the screen flashes on scan.
hardwareTriggerEnabledboolWhether a hardware button starts scanning.
hardwareTriggerKeyCodeint?null: the dedicated button on XCover devices, or volume down on other devicesThe button that starts scanning. Applies on Android only.
toastSettingsSparkScanToastSettingsThe toast messages the mini preview shows.
selectionModeCandidateBrushBrush?null: the default brushThe brush that highlights candidate barcodes while selectionMode is auto. Added in 8.5.0.
shouldShowOnTopAlwaysbooltrueWhether the SparkScanView always stays on top of the Flutter content. iOS only.
periscopeModeEnabledboolfalseMirrors the camera feed for a periscope device. iOS only. Added in 8.3.0.

SparkScanView properties​

You set these properties on the SparkScanView widget, or pass most of them as named parameters of the SparkScanView constructor. To set the UI listener, call setListener().

NameTypeDefaultValuesWhat it does
feedbackDelegateSparkScanFeedbackDelegate?Decides the feedback for each scanned barcode. Without a delegate, every scan gets the success feedback.
feedbackExtendedDelegateSparkScanFeedbackExtendedDelegate?Like feedbackDelegate, and also decides the feedback for scanned items. Set this one or feedbackDelegate, not both. Added in 8.2.0.
hardwareTriggerSupportedbool, staticRead-only. Whether the device supports hardware buttons: true from Android API level 28. Android only.
triggerButtonVisiblebooltrueShows the trigger button.
triggerButtonImageImage?The image in the trigger button.
triggerButtonCollapsedColorColor?The background color of the collapsed trigger button.
triggerButtonExpandedColorColor?The background color of the expanded trigger button.
triggerButtonAnimationColorColor?The color of the pulsing animation around the trigger button while the scanner is active.
triggerButtonTintColorColor?The tint color of the trigger button.
previewSizeControlVisiblebooltrueShows the control that resizes the mini preview.
previewCloseControlVisiblebooltrueShows the control that closes the mini preview.
torchControlVisiblebooltrueShows the torch control. Hidden when defaultTorchState is auto.
zoomSwitchControlVisiblebooltrueShows the zoom switch control.
scanningBehaviorButtonVisibleboolfalseShows the toolbar button that switches between single and continuous scanning.
selectionModeButtonVisibleboolfalseShows the toolbar button that switches selectionMode between on and off. Added in 8.5.0.
cameraSwitchButtonVisibleboolfalseShows the toolbar button that switches between the world-facing and user-facing cameras. Beta.
barcodeCountButtonVisibleboolfalseShows the toolbar button for MatrixScan Count.
barcodeFindButtonVisibleboolfalseShows the toolbar button for MatrixScan Find.
labelCaptureButtonVisibleboolfalseShows the toolbar button for Smart Label Capture.
toolbarBackgroundColorColor?nullThe background color of the settings toolbar.
toolbarIconActiveTintColorColor?nullThe color of active toolbar icons.
toolbarIconInactiveTintColorColor?nullThe color of inactive toolbar icons.

Framework differences​

In Flutter, these options differ from the other SparkScan frameworks:

Next step​

Choosing which barcode types to scan