Custom Text Builder
Defined in library scandit_datacapture_label
- CustomTextBuilder
class CustomTextBuilder : TextFieldBuilder<CustomTextBuilder, CustomText>
Added in version 7.2.0
Builder class for creating CustomText field definitions. Provides a fluent interface for configuring text field properties including validation patterns, location constraints, and OCR-specific settings.
- setDataTypePatterns(dataTypePattern, dataTypePatterns)
CustomTextBuilder setDataTypePatterns({String? dataTypePattern, Iterable<String>? dataTypePatterns})
Added in version 7.2.0
Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same pattern (e.g., when both packaging and expiry dates are present).
- setDataTypePattern(dataTypePattern)
CustomTextBuilder setDataTypePattern(
RegExpdataTypePattern)Added in version 7.2.0
Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same pattern (e.g., when both packaging and expiry dates are present).
- resetDataTypePatterns()
CustomTextBuilder resetDataTypePatterns()
Added in version 7.4.0
This method can be used to remove the default dataTypePattern, allowing you to rely solely on the patterns for detection.
- build(name)
CustomText build(String name)
Added in version 7.2.0
Creates a CustomText field definition with the specified name and all configured properties.