Last active
December 15, 2021 20:54
-
-
Save PiotrPrus/a22673a5aea85680b8b093b42f698b98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selectedPosition by remember { mutableStateOf(0) } | |
val selectedBar by remember(selectedPosition, barAreas) { | |
derivedStateOf { | |
barAreas.find { it.xStart < selectedPosition && selectedPosition < it.xEnd } | |
} | |
} | |
Modifier.tapOrPress( | |
onStart = { }, | |
onCancel = { }, | |
onCompleted = { selectedPosition = it } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment