Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created February 11, 2025 18:04
Show Gist options
  • Select an option

  • Save vitoksmile/ca4b4b334ff02f159419047a309e1440 to your computer and use it in GitHub Desktop.

Select an option

Save vitoksmile/ca4b4b334ff02f159419047a309e1440 to your computer and use it in GitHub Desktop.
ComposeHints
fun Modifier.hintAnchor(
state: HintAnchorState,
shape: Shape = RectangleShape,
): Modifier {
state.shape = shape
//..onGloballyPositioned
}
@Stable
class HintAnchorState internal constructor() {
//...other states here
internal var shape: Shape by mutableStateOf(RectangleShape)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment