Text Capture
Defined in library scandit_datacapture_text
- TextCapture
class TextCapture : DataCaptureMode
Added in version 6.11.0
Capture mode for reading text.
- TextCapture.forContext(context, settings)
TextCapture.forContext(DataCaptureContext? context, TextCaptureSettings settings)
Added in version 6.11.0
Construct a new text capture mode with the provided context and settings.
- isEnabled
bool isEnabled
Added in version 6.11.0
Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.
- applySettings(settings)
Future<
void
> applySettings(TextCaptureSettings settings)Added in version 6.11.0
Asynchronously apply the new settings to the text capture mode. If text capture is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If text capture is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.
- feedback
TextCaptureFeedback feedback
Added in version 6.11.0
Instance of TextCaptureFeedback that is used by text capture to notify users about Success events.
The default instance of the Feedback will have both sound and vibration enabled. A default beep sound will be used for the sound.
To change the feedback emitted, the TextCaptureFeedback can be modified as shown below, or a new one can be assigned.
TextCapture textCapture = ...; textCapture.feedback.success = Feedback(Vibration.defaultVibration, Sound.defaultSound);
- addListener(listener)
void
addListener(TextCaptureListener listener)Added in version 6.11.0
Add the listener to observe this text capture instance.
In case the same listener is already observing this instance, calling this method will not add the listener again.
- addAdvancedListener(listener)
void
addAdvancedListener(TextCaptureAdvancedListener listener)Added in version 6.14.0
Add the advanced listener to observe this text capture instance.
In case the same listener is already observing this instance, calling this method will not add the listener again.
- removeListener(listener)
void
removeListener(TextCaptureListener listener)Added in version 6.11.0
Remove a previously added listener from this text capture instance.
In case the listener is not currently observing this instance, calling this method has no effect.
- removeAdvancedListener(listener)
void
removeAdvancedListener(TextCaptureAdvancedListener listener)Added in version 6.14.0
Remove a previously added advanced listener from this text capture instance.
In case the listener is not currently observing this instance, calling this method has no effect.
- recommendedCameraSettings
static CameraSettings get recommendedCameraSettings
Added in version 6.11.0
Returns the recommended camera settings for use with text capture.
- context
DataCaptureContext? get context
Added in version 6.11.0
Implemented from DataCaptureMode. See DataCaptureMode.context.