Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Flutter, How can I change TextFormField validation error message style?

Tags:

flutter

I want to set a bigger font size for error message validation in TextFormField but I don't know how.

like image 604
ilBarra Avatar asked Jan 04 '19 14:01

ilBarra


People also ask

How do you change the position of validation error in Flutter forms?

Just put a container as a parent of textfield can solve the error.

How do I use TextFormField in Flutter?

How to Handle Input Data In TextFormField In Flutter Using Controller. To handle user input in TextFormField, create an object of TextEditingController class. Create a TextEditingController object like below and assign it to the controller property of TextFormField. Its object will hold the input data.

How do you show error messages in Flutter?

We already have a SnackBar widget on Flutter to show such errors or warning messages. To display it using ScaffoldMessenger . Inside the SnackBar, the content is a simple text. If you click on the show message button.


1 Answers

For this you have to use InputDecoration

TextFormField(   decoration: InputDecoration(     errorStyle: TextStyle(       fontSize: 16.0,     ),   ),   ... ) 
like image 76
Andrey Turkovsky Avatar answered Sep 19 '22 14:09

Andrey Turkovsky