Does anyone have a Text-like component, that is capable of handling links (urls) inside? I have
AnnotatedString
with some url annotations, and I’m struggling to make it working properly with hover interactions. I want (like in a browser) to highlight links when they are hovered, and change pointer icon to hand. It causes infinite recomposition because when I handle enter/move pointer event, the
AnnotatedString
is changed (to highlight hovered part of the text with url), which causes recomposition of
BasicText
, and then
onTextLayout
yields different
TextLayoutResult
(because input changed, particularly span styles), which causes remembered mutable state to be modified, which triggers more changes and causes recomposition again, ad infinum. Also, it seems recomposition causes synthentic
PointerEventType.Exit
to be sent, which causes un-hover path to be triggered. I just can’t find how to get it all together. Any ideas, maybe?