Hello, how can I use a block parameter of withstyle parameter when we create a annotated string in jetpackpack compose

15 Views Asked by At

Hello I have a problem I use the annotated string of Kotlin I am creating a string but I realize that when I created a string the text inside the build noted string , in the withstyle we have 2 parameters the first parameter is style this is where we can define the style of the text that we are creating but the 2nd parameter is block it is this 2nd parameter contained in withstyle which I cannot use, I wonder what it is for and if anyone has the different possible uses of this 2nd parameter.

My second concern is to know if we can group several evils together to apply them directly to a style when the words do not follow one another because I realize that when we have to apply the same style to several words we must each time put the word in question in append that is to say we put the first word, then we give the characteristics of the style and we put the word in append and then we move on to the 2nd word uh and then just like next word to which we want to apply the same style we put them again in a paint by applying the same style and we move on to the 3rd word to which we want to apply the same style and we put again in append. Is there no way to group all these words together and apply the style to them only once.

0

There are 0 best solutions below