ScanningUx

fun ScanningUx(modifier: Modifier, uiState: BaseUiState, onExitScanning: () -> Unit, uiSettings: UiSettings, onTorchStateChange: () -> Unit, onFlipDocumentAnimationCompleted: () -> Unit, onReticleSuccessAnimationCompleted: () -> Unit, onChangeOnboardingDialogVisibility: (Boolean) -> Unit, onChangeHelpScreensVisibility: (Boolean) -> Unit, onChangeHelpTooltipVisibility: (Boolean) -> Unit, onRetry: () -> Unit, onDoneError: () -> Unit)

Composable function that provides the user interface for the scanning screen, including the reticle, instruction messages, buttons, and dialogs.

This function is responsible for rendering all the UI elements visible during the document scanning process, except for the camera preview itself. It handles displaying the reticle, instruction messages, exit and torch buttons, help components, and various dialogs based on the provided UI state and settings.

Parameters

modifier

The Modifier to be applied to the outermost container of the UI.

uiState

The BaseUiState containing the current state of the UI.

onExitScanning

A callback function invoked when the user wants to exit the scanning process.

uiSettings

The UiSettings used to configure the UI.

onTorchStateChange

A callback function invoked when the user wants to change the torch state.

onFlipDocumentAnimationCompleted

A callback function invoked when the flip document animation is completed.

onReticleSuccessAnimationCompleted

A callback function invoked when the reticle success animation is completed.

onChangeOnboardingDialogVisibility

A callback function invoked when the visibility of the onboarding dialog should change.

onChangeHelpScreensVisibility

A callback function invoked when the visibility of the help screens should change.

onChangeHelpTooltipVisibility

A callback function invoked when the visibility of the help tooltip should change.

onRetry

A callback function invoked when retry button is pressed (e.g on timeout or document class filtered dialog)

onDoneError

A callback function invoked when the unrecoverable error occurs and cancel button is pressed on error dialog.