{
"type": "form",
"autovalidateMode": "always",
"child": {
"type": "column",
"children": [
{
"type": "textFormField",
"id": "username",
"decoration": {
"labelText": "Username"
}
},
{
"type": "textFormField",
"id": "password",
"decoration": {
"labelText": "Password"
}
},
{
"type": "filledButton",
"child": {
"type": "text",
"data": "Submit"
},
"onPressed": {
"actionType": "validateForm",
"isValid": {
"actionType": "networkRequest",
"url": "https://dummyjson.com/auth/login",
"method": "post",
"contentType": "application/json",
"body": {
"username": {
"actionType": "getFormValue",
"id": "username"
},
"password": {
"actionType": "getFormValue",
"id": "password"
}
}
}
}
}
]
}
}