Note

This API is still in beta and may change in future versions of Scandit Data Capture SDK.

Text Definition Builder

Defined in package com.scandit.datacapture.barcode

TextDefinitionBuilder
class TextDefinitionBuilder

Added in version 8.6.0

A fluent builder class for creating TextDefinition 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)
fun setOptional(optional: Boolean): TextDefinitionBuilder

Added in version 8.6.0

Sets whether the text component is optional in the item definition. Returns the builder for configuring the rest of the properties.

setSemantics(semantics)
fun setSemantics(semantics: ScanComponentTextSemanticType): TextDefinitionBuilder

Added in version 8.6.0

Sets a predefined semantics type for the text. Returns the builder for configuring the rest of the properties.

build()
fun build(): TextDefinition

Added in version 8.6.0

Builds the TextDefinition object.