How to highlight a word in string in flutter programmatically
问题 Is there any way to change color on particular word in a string ? Text("some long string") now i want to give color to only long word. can someone tell me how can i do this programatically ? eg:- I am long a really long and long string in some variable, a long one now here i want to seperate long word. I can seperate simple string to highlight one word but not sure how to find and highlight each of these words. 回答1: Wrap the word in a TextSpan and assign style properties to change the text