annotation Click Detector
fun Modifier.annotationClickDetector(textLayoutResult: TextLayoutResult?, activeTags: Set<String>, activePointerIcon: PointerIcon = PointerIcon.Hand, onClick: (Int, List<AnnotatedString.Range<String>>) -> Unit): Modifier
Detects annotations tagged by a specific tag in the annotated text, which is shown in the component. If a mouse pointer hovers over such text, its icon is changed and if clicked, the onClick handler will be called.
Parameters
text Layout Result
Layout result of the text-displaying component in which annotations should be detected.
active Tags
Set of tags, which are considered active. Only active tags are detected.
active Pointer Icon
What should a pointer hovering above the active annotation look like. Defaults to PointerIcon.Hand.
on Click
Handler to be called when an active annotation is clicked. Receives the text offset where the click happened and a list of annotations on that offset.