I have a use-case where I want to change the colour of a letter in a String inside a Text
widget. Let's say that my String is "Flutter". On pressing the FloatingActionButton
, I want the letter 'F' to change its colour, then on the next press of the FloatingActionButton
, change the colour of letter 'l', then 'u', then 't', then 't', then 'e' and then finally 'r' with every FloatingActionButton
press.
Please don't suggest having a different Text
widget for every letter.