Scanner Flow
DocumentScannerFlow provides a route-driven scan experience:
scan: capture photo with live contour overlay.edit: adjust crop points and apply filter previews.share: preview processed output and share it.ocr: run OCR on processed image.
Default usage
Section titled “Default usage”import { DocumentScannerFlow } from '@korsolutions/vision';
export function ScannerScreen() { return <DocumentScannerFlow initialRoute="scan" />;}Navigation model
Section titled “Navigation model”The flow uses an internal route stack and a navigation manager exported as:
ScannerNavigationProvideruseScannerNavigationScannerRoute
Route reset behavior:
- Navigating to
scanresets the stack to['scan'].
Session state model
Section titled “Session state model”Session state is managed in ScannerProvider and exposed via useScannerContext.
Key state values:
capturedImagecropPointsselectedFiltereditPreviewUriprocessedImageUriisFilterProcessingisFinalizingprocessingError
Key actions:
startSession(...)setCropPoints(...)setSelectedFilter(...)finalizeDocument()resetSession()