Skip to content

Commit

Permalink
Add network results to form
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshub024 committed Feb 26, 2024
1 parent 05e39f7 commit afe1173
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions examples/mirai_gallery/assets/json/form_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
"foregroundColor": "#ffffff"
},
"onPressed": {
"actionType": "request",
"actionType": "networkRequest",
"url": "https://dummyjson.com/auth/login",
"method": "post",
"contentType": "application/json",
"data": {
"body": {
"username": {
"actionType": "getFormValue",
"id": "username"
Expand All @@ -72,7 +72,35 @@
"actionType": "getFormValue",
"id": "password"
}
}
},
"results": [
{
"statusCode": 200,
"action": {
"actionType": "showDialog",
"widget": {
"type": "alertDialog",
"title": {
"type": "text",
"data": "Successful"
}
}
}
},
{
"statusCode": 400,
"action": {
"actionType": "showDialog",
"widget": {
"type": "alertDialog",
"title": {
"type": "text",
"data": "Error"
}
}
}
}
]
}
}
]
Expand Down

0 comments on commit afe1173

Please sign in to comment.