I’m trying to do set the overflow of the errorText in TextFormField widget. As you can see in the following picture, the remaining error text goes into the ellipsis.
I want my error message to completely visible. I’ve tried to set the overflow from the errorTextStyle, but it doesn’t work.
errorStyle: TextStyle(
color: AppColors.secondaryRed,
overflow: TextOverflow.visible,
),
Am I missing something? Or is there any workaround to achieve this?
4
Answers
Try adding
errorMaxLines: 2
under the overflow.If this is not handled by error style, You can add another text which represent your error, i.e. in your validator function you have to update errorString.
Code here:
Just add
errorMaxLines: 3
in theInputDecoration
Output:
Complete Code:
Inside InputDecoration put this line of code errorMaxLines: 2: