I have a Searchbar and due to my app theming, the text inside becomes hard to read when its selected. I would like to know if there is a way to set a different text color when it's selected.
Thanks in advance!
Flutter does not support changing the selected text color via the theme declaration in the main widget, only can change background color. You must use the SelectableText
in each input style
property, like as:
SelectableText(
'Example text',
style: TextStyle(color: Colors.red), // Yout text color on selected
)