Build forms with validation
In Enoria, creating forms is really easy. You create a FormKey
, pass it to a Form
widget, add in some TextFormFields
and you're good to go! You can also provide validator functions to your field, and display errors if there is any of them.
Example : Login form
To do that, we first need to create a custom widget. We need to create a state variable called loggedin, that will tell us if the user is logged in or not, and display the correct widget tree:
Last updated
Was this helpful?