Want to handle long text in InputDecoration->labelText in Flutter? Apologies for adding to an old question, but just learning flutter myself and stumbled into a similar issue.
My workaround was to use hintText instead of labelText, and explicitly adding \n line breaks to it.
Something like
1 2 3 4 5 6 7 8 9 |
String questionString = 'This sample is very \n very very very long' new TextFormField ( decoration: new InputDecoration( hintText: questionString, hintStyle: new TextStyle( fontSize: 18.0, color: new Color(0xFF18776A), ) . ), |
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.