| íëĒŠ | ë´ėŠ |
|---|---|
| Category | petmedi-development |
| Complexity | simple |
| MCP Servers | flutter-inspector |
/inspector/form#
Context Framework Note: Activated when debugging form-related issues.
Triggers#
- Form submission failure
- Validation issues
- Field state check
MCP Tools#
form_list#
Lists all forms on the current screen.
Response example:
{
" forms " : [
{
" key " : " loginForm " ,
" fieldCount " : 3,
" isValid " : false,
" fields " : [ " email " , " password " , " rememberMe " ]
}
]
}
form_get_state#
Returns the detailed state of a specific form.
Parameters:
formKey: Form key (required)
Response example:
{
" formKey " : " loginForm " ,
" state " : {
" isValid " : false,
" fields " : {
" email " : {
" value " : " user@example " ,
" isValid " : false,
" error " : " Invalid email format "
},
" password " : {
" value " : " *** " ,
" isValid " : true,
" error " : null
}
}
}
}
form_get_errors#
Returns all errors for a form.
form_validate#
Manually validates a form.
Common Diagnostics#
Form not submitting#
1. form_get_state - > Check current state
2. If isValid: false, check errors
3. form_get_errors - > Query all errors
4. Review validation logic
Validation not working#
1. form_validate - > Run manual validation
2. Check error messages
3. Review validator function logic
Field values not persisting#
1. form_get_state - > Check field values
2. Verify TextEditingController connection
3. Review form state restoration logic
Error messages not showing#
1. form_get_errors - > Confirm errors exist
2. Check ErrorText widget rendering
3. Check AutovalidateMode settings
Examples#
Check form list#
/inspector/form list
Check form state#
/inspector/form state loginForm
Check form errors#
/inspector/form errors
Manual validation#
/inspector/form validate loginForm
References#
- Detailed implementation:
.claude/agents/flutter-inspector-form.md - Master inspector:
.claude/commands/inspector.md - UI inspector:
.claude/commands/inspector/ui.md