collectStateWithLifecycle

fun CameraInfo.collectStateWithLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): State<CameraInfoState>

Collects CameraInfo.state as Compose State, scoped to the provided LifecycleOwner.

Collection starts when lifecycle reaches minActiveState and stops when below it.


fun CameraInfo.collectStateWithLifecycle(lifecycle: Lifecycle, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): State<CameraInfoState>

Collects CameraInfo.state as Compose State, scoped to the provided Lifecycle.

Collection starts when lifecycle reaches minActiveState and stops when below it.