Skip to content

Instantly share code, notes, and snippets.

@eevajonnapanula
Created July 24, 2023 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eevajonnapanula/6f8b587b46cc3376e803cb6c774fbd6e to your computer and use it in GitHub Desktop.
Save eevajonnapanula/6f8b587b46cc3376e803cb6c774fbd6e to your computer and use it in GitHub Desktop.
var isHighlighted by remember { mutableStateOf(false) }
...
if (highlightedX == null) isHighlighted = false
highlightedX?.let {
isHighlighted =
it > (position.first - widthBetweenPoints)
&& it < (position.second - widthBetweenPoints)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment