Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
Barcode Definition Builder
Defined under the namespace Scandit.Datacapture.Barcode
- BarcodeDefinitionBuilder
class BarcodeDefinitionBuilderAdded in version 8.1.0
A fluent builder class for creating BarcodeDefinition objects with a convenient, chainable interface. This builder provides methods to add various field types and configure their properties in a structured manner.
- setOptional(optional)
setOptional(optional: boolean): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets whether the barcode component is optional in the item definition. Returns the builder for configuring the rest of the properties.
- setSymbologies(symbologies)
setSymbologies(symbologies: Set<Symbology>): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets the barcode symbologies for the component. Returns the builder for configuring the rest of the properties.
- setPreset(preset)
setPreset(preset: ScanComponentBarcodePreset | null): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets a predefined preset for the component. Returns the builder for configuring the rest of the properties.
- setLocation(location)
setLocation(location: Quadrilateral | null): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets an expected location for the barcode. Returns the builder for configuring the rest of the properties.
- setHiddenProperties(hiddenProperties)
setHiddenProperties(hiddenProperties: string): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets the hidden properties for the component. Returns the builder for configuring the rest of the properties.
- setValueRegexes(valueRegexes)
setValueRegexes(valueRegexes: string[]): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets the value regexes for the barcode. Returns the builder for configuring the rest of the properties.
- setAnchorRegexes(anchorRegexes)
setAnchorRegexes(anchorRegexes: string[]): BarcodeDefinitionBuilder
Added in version 8.1.0
Sets the anchor regexes for the barcode. Returns the builder for configuring the rest of the properties.
- build()
build(): BarcodeDefinition
Added in version 8.1.0
Builds the BarcodeDefinition object.