ChangeEvent
An effect that calls onEvent to record an event when a value changes. This is useful when you want to monitor a specific value in a Composable, such as a CompositionLocal value.
PreviewLab {
ChangeEvent(LocalDensity.current, "Density")
}Content copied to clipboard
Parameters
value
Value at which changes are detected.
title
title of the event to be passed to onEvent.
description
description of the event to be passed to onEvent.
See also
fun <Value> PreviewLabScope.ChangeEvent(value: Value, title: (Value) -> String, description: (Value) -> String? = { null })
An effect that calls onEvent to record an event when a value changes. This is useful when you want to monitor a specific value in a Composable, such as a CompositionLocal value.
PreviewLab {
ChangeEvent(LocalDensity.current, { "Density changed: $it" })
}Content copied to clipboard
Parameters
value
Value at which changes are detected.
title
title of the event to be passed to onEvent.
description
description of the event to be passed to onEvent.