Compose Multiplatform Views
The scandit-kmp-datacapture-label-compose module exposes label capture as a @Composable
function. See Using the SDK with Compose Multiplatform for the shared setup.
Dependency
Add the label Compose companion to your commonMain source set (it pulls in the base
label module transitively); it builds on core-compose:
commonMain.dependencies {
implementation("com.scandit.datacapture.kmp:core-compose:<version>")
implementation("com.scandit.datacapture.kmp:label-compose:<version>")
}
Label Capture
The label view picks its overlay declaratively with LabelOverlayStyle:
@Composable
fun LabelScreen() {
LabelCaptureView(
settings = labelCaptureSettings { /* configure label definitions */ },
modifier = Modifier.fillMaxSize(),
overlayStyle = LabelOverlayStyle.Basic,
onCapture = { capturedLabels -> /* handle captured labels */ },
)
}