Form input: Validation errors

Just as you would with a “hint”, pass an InputDecoration object to the decoration constructor for the Text widget. However, you don’t want to start off by showing an error. Instead, when the user has entered invalid data, update the state, and pass a new InputDecoration object.

Related concepts

Form input: Validation errors — Structure map

Clickable & Draggable!

Form input: Validation errors — Related pages: