I’m working on a custom modifier for Text composab...
# compose
z
I’m working on a custom modifier for Text composable where I would need to access
TextLayoutResult
, is there any nice way to grab it at Modifier.Node level or the only way is to remember it at a composable scope and pass it as a modifier parameter? 👀
z
There’s no way to get it from a modifier, since it would be possible to have multiple text nodes under a single modifier and it’s not clear what API shape would allow you to meaningfully distinguish them
thank you color 1
z
since it would be possible to have multiple text nodes under a single modifier
I guess that’s the part I was missing 🙂 Was thinking that if we have text layout and applied modifier to it, we could try to grab it from the text node in this particular layout node.