StacForm(
autovalidateMode: StacAutovalidateMode.always,
child: StacColumn(
children: [
StacTextFormField(
id: 'username',
decoration: StacInputDecoration(labelText: 'Username'),
),
StacTextFormField(
id: 'password',
decoration: StacInputDecoration(labelText: 'Password'),
),
StacFilledButton(
child: StacText(data: 'Submit'),
onPressed: StacFormValidateAction(
isValid: StacNetworkRequestAction(
url: 'https://dummyjson.com/auth/login',
method: Method.post,
contentType: 'application/json',
body: {
'username': StacGetFormValueAction(id: 'username'),
'password': StacGetFormValueAction(id: 'password'),
},
),
),
),
],
),
)