LayerOpacitySlider

fun LayerOpacitySlider(layerKey: String, opacity: Float, onOpacityChange: (String, Float) -> Unit, modifier: Modifier = Modifier)(source)

One layer's opacity, as a slider that reports only when the drag ends.

The reporting rule is load-bearing, not a nicety: every report is a DataStore write, and a slider that reported per frame would write dozens of times across a single drag. LastHeardSlider holds its position the same way.

Parameters

layerKey

identifies the layer to the caller and, as layerOpacityTestTag, to a test. See org.meshtastic.core.repository.MapPrefs.layerOpacity for what a key is.