How to wrap the hint text in a text field in Flutter?
Using maxlines didn’t work for me (for Flutter Web), but until the text automatically wraps I’m adding \n where I want it to break.
1 2 3 4 5 6 7 8 9 10 | TextFormField( maxLines: 5, decoration: InputDecoration( hintMaxLines: 5, hintText: 'Make it a descriptive message that allows your client to \n understand what you are working on, what challenges you are \n facing, and if anything is unclear. \n Try to be clear but positive!', labelText: 'Today\'s message to your client, \n what is the team working on?', labelStyle: TextStyle(fontSize: 14,), hintStyle: TextStyle(fontSize: 14,), ), ), |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.