rememberPhotoOutput

Create a CameraPhotoOutput with the given options, kept across recompositions and recreated when the options change (the equivalent of VisionCamera's usePhotoOutput).

val photoOutput = rememberPhotoOutput()
Camera(device = TargetCameraPosition.BACK, isActive = true, outputs = listOf(photoOutput))
// later, e.g. in a button's coroutine:
val photoFile = photoOutput.capturePhotoToFile()