DocumentAutoCaptureWidget class final
Document Auto Capture UI component (widget).
The widget with instructions for obtaining quality document images suitable for further processing.
Widget configuration
In order to configure the behaviour of DocumentAutoCaptureWidget, use DocumentAutoCaptureConfiguration and pass in to DocumentAutoCaptureWidget.new. This is a required parameter.
Control the widget and consume outputs
As soon as the widget is created, the onCreated callback is called with the DocumentAutoCaptureWidgetController parameter. Use the controller to control the Document Auto Capture process.
To start the Document Auto Capture process call the DocumentAutoCaptureWidgetController.start method. You can start the process any time.
In case you want to handle detection data, implement onProcessed callback. This callback is called with each processed camera frame.
When the Document Auto Capture process finishes successfully, the result will be returned via the onCaptured callback.
In case you want to force the capture event, call the DocumentAutoCaptureWidgetController.requestCapture method. The most recent image will be returned via the onCaptured callback asynchronously.
Call DocumentAutoCaptureWidgetController.start method again in case you need to start over the Document Auto Capture process (e.g. you want to capture both sides of the document, one after another).
You can also call DocumentAutoCaptureWidgetController.start method to stop and start over ongoing process as well.
In case you want to stop the Document Auto Capture process prematurely, call the DocumentAutoCaptureWidgetController.stopAsync method. The callback in the method argument indicates that the processing is over.
UI Customization
DOT Flutter SDK is wrapper around the native Android and iOS SDKs. If you want to customize the appearance of the widget, the process is platform-specific. Refer to the Android UI customization or the iOS UI customization for detailed instructions.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DocumentAutoCaptureWidget
Constructors
- DocumentAutoCaptureWidget({Key? key, required DocumentAutoCaptureConfiguration configuration, OnDocumentAutoCaptureCreatedCallback? onCreated, OnDocumentAutoCaptureProcessedCallback? onProcessed, OnDocumentAutoCaptureCapturedCallback? onCaptured, OnDocumentAutoCaptureNoCameraPermissionCallback? onNoCameraPermission})
-
Create a new widget with the given
configurationand callbacks.const
Properties
- configuration → DocumentAutoCaptureConfiguration
-
Configuration of the Document Auto Capture process.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCaptured → OnDocumentAutoCaptureCapturedCallback?
-
Called only once for the whole process, when the final document image candidate has been chosen.
Once this callback is called, the whole process is considered to be over.
final
- onCreated → OnDocumentAutoCaptureCreatedCallback?
-
Called when the widget is created.
final
- onNoCameraPermission → OnDocumentAutoCaptureNoCameraPermissionCallback?
-
Called when camera permission was not granted.
final
- onProcessed → OnDocumentAutoCaptureProcessedCallback?
-
Called when a camera image is processed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited