RecognizedText Function

@Composable fun RecognizedText(modifier: Modifier = Modifier, picture: ScanPicture?, lookupRect: Rect?, lookupProgress: Int, originalText: ScanText, modifiedText: ScanText, zoomImageParams: ZoomImageParams = defaultZoomImageParams( scrollPadding = PaddingValues(0.dp) ), onCancel: () -> Unit = { }, onConfirmRestore: ConfirmRestoreScope.(List<CharSequence>) -> Unit = { }, onModifiedTextChanged: (ScanText) -> Unit = { }, onProgress: (RecognizedStatus) -> Unit = { }, emptyTextMessage: @Composable (modifier: Modifier) -> Unit)

Shows the recognised text over the page and lets the user correct it.

Parameters

  • modifier — a Compose Modifier.
  • picture — an instance of ScanPicture to show.
  • lookupRect — rectangle to highlight.
  • lookupProgress — progress value.
  • originalText — recognized text.
  • modifiedText — text was modified by user.
  • zoomImageParams — parameters to display the picture.
  • onCancel — callback to cancel recognition.
  • onConfirmRestore — callback to replace text part from originalText.
  • onModifiedTextChanged — callback to save modified text.
  • onProgress — callback to inform a recognition status.
  • emptyTextMessage — a Composable function to show message if page hasn’t a text.
Top