PaperScannerOptions class

Behavioral configuration for a scan session (separate from visual PaperScannerStyle).

Constructors

PaperScannerOptions({bool outputPdf = false, int minPages = 0, int maxPages = 0, ScanFilter initialFilter = ScanFilter.original, bool enableLiveDetection = true, int detectionFps = 10, bool autoConfirmSinglePage = false, bool autoCapture = true, bool confirmAfterCapture = false, double autoCaptureConfidence = 0.66, int autoCaptureStableFrames = 3, double autoCaptureMotionTolerance = 0.025})
const

Properties

autoCapture → bool
Initial state of the auto-capture toggle. When true (the default) the scanner shoots automatically once a confident, stable document quad is held in frame — the user does not have to tap the shutter. The manual shutter button stays available either way.
final
autoCaptureConfidence → double
Minimum detection confidence (0..1) a live quad must reach before auto-capture will consider it. Lower = fires on weaker detections. Defaults to 0.66.
final
autoCaptureMotionTolerance → double
Maximum movement of any quad corner between two detections, as a fraction of the frame, still counted as "still". Larger = more tolerant of shake (fires sooner); smaller = demands a steadier hold. Defaults to 0.025.
final
autoCaptureStableFrames → int
Number of consecutive "still" detections required before auto-capture fires. Higher = the document must be held steady longer. Defaults to 3 (≈0.3s at the default detectionFps).
final
autoConfirmSinglePage → bool
When true and maxPages is 1, the session finishes automatically after the first page's filter step instead of showing add/done controls.
final
confirmAfterCapture → bool
When true, each capture pauses on a Retake / Keep crop-confirm step before the page is committed (the legacy flow). When false (the default) captures commit immediately with the detected crop — matching the native OS scanners — and corrections happen later in the detail/edit view.
final
detectionFps → int
Target frames-per-second for realtime detection. The preview stream is throttled to roughly this rate (and skips frames while a detection is in flight) to keep the UI smooth. Higher values make the edge overlay track the document more responsively at some CPU cost; defaults to 10.
final
detectionInterval → Duration
Minimum interval between processed preview frames, derived from detectionFps.
no setter
enableLiveDetection → bool
Whether to run realtime edge detection on the live preview.
final
hashCode → int
The hash code for this object.
no setterinherited
initialFilter → ScanFilter
Filter applied to a page immediately after cropping.
final
maxPages → int
Maximum number of pages; 0 means unlimited.
final
minPages → int
Minimum number of pages required before the session can finish.
final
outputPdf → bool
When true, the result includes an assembled multi-page PDF (PaperScanResult.pdfPath).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? outputPdf, int? minPages, int? maxPages, ScanFilter? initialFilter, bool? enableLiveDetection, int? detectionFps, bool? autoConfirmSinglePage, bool? autoCapture, bool? confirmAfterCapture, double? autoCaptureConfidence, int? autoCaptureStableFrames, double? autoCaptureMotionTolerance}) → PaperScannerOptions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited