I have a similar use case to be implemented for hi...
# compose
a
I have a similar use case to be implemented for highlighting all the occurrence of a search term as described in https://link.medium.com/mipXrC4COmb But i would like to avoid Jetpack Compose AnnotatedString Builder in viewmodel. This means i get the for loop both in view model(for highlight positions) and in composable(to apply annotatedString). The other option is to have the for loop entirely in Composable. What is the recommended approach for these scenarios?