onseok / peekaboo

🌄 Kotlin Multiplatform library for Compose Multiplatform, designed for seamless integration of an image picker feature in iOS and Android applications.
Apache License 2.0
237 stars 20 forks source link

How to setting Camera View is Full Screen ? #100

Open diigel opened 2 months ago

diigel commented 2 months ago

Im tired to make this camera view full screen, can someone tell me please

@Composable
fun PeekabooCameraView(
    modifier: Modifier = Modifier,
    onCapture: (ByteArray?) -> Unit,
    onBack: () -> Unit,
) {
    val state = rememberPeekabooCameraState(onCapture = onCapture)
    Box(modifier = modifier) {
        PeekabooCamera(
            state = state,
            modifier = Modifier.fillMaxSize(),
            permissionDeniedContent = {
                PermissionDenied()
            },
        )
        CameraOverlay(
            isCapturing = state.isCapturing,
            onBack = onBack,
            onCapture = { state.capture() },
            onConvert = { state.toggleCamera() }
        )
    }
}