flutter textformfield vs textfield code example

Example 1: text input validation message color flutter

TextFormField(
  decoration: InputDecoration(
     errorStyle: TextStyle(
      color: Colors.red[400],
      fontWeight: FontWeight.bold,
      fontSize: 13,
    ),
  ),
  ...
)

Example 2: flutter text field form

TextField(
  decoration: InputDecoration(
    border: InputBorder.none,
    hintText: 'Enter a search term'
  ),
);

Example 3: text form field flutter

TextFormField(
  decoration: InputDecoration(
    labelText: 'Enter your username'
  ),
);

Tags:

Java Example