| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /inspector:ui |
| Category | kobic-development |
| Complexity | simple |
| MCP Servers | flutter-inspector |
/inspector:ui โ ํ๋ฉด ๊ตฌ์กฐ ๋ค์ฌ๋ค๋ณด๊ธฐ#
ํ๋ง๋๋ก#
์คํ ์ค์ธ ์ฑ ํ๋ฉด์ด ์ด๋ค ๋ถํ(์์ ฏ)๋ค๋ก ์ด๋ป๊ฒ ์์ฌ ์๋์ง ๋ค์ฌ๋ค๋ณด๋ ๋๊ตฌ์ ๋๋ค. ์ง์ ์ค๊ณ๋๋ฅผ ํผ์ณ ๋ณด๋ฉด์ "์ด๋๊ฐ ์์ ธ๋์๋์ง, ์ด๋ค ๋ฐฉ์ด ์ด๋์ ์๋์ง" ํ์ธํ๋ ๊ฒ๊ณผ ๊ฐ์์.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ํ๋ฉด ์์๊ฐ ํ๋ฉด ๋ฐ์ผ๋ก ์์ ธ๋์ค๋ ๋ ์ด์์ ๊นจ์ง(overflow) ์ด ์๊ฒผ์ ๋
- "์์ด์ผ ํ ๋ฒํผยท๊ธ์๊ฐ ํ๋ฉด์ ์ ๋ณด์ธ๋ค" ํ๊ณ ์์ ฏ์ด ์ฌ๋ผ์ง ๊ฒ์ฒ๋ผ ๋ณด์ผ ๋
- ํ๋ฉด์ด ๋๋ฆฌ๊ฑฐ๋, ์์ ํ๋ฉดยทํฐ ํ๋ฉด์์ ๋ ์ด์์์ด ์ ๋๋ก ์ ๋ง์ ๋
์ฃผ๋ก ๊ฐ๋ฐ์๋ AI๊ฐ ์ฑ์ ์ง์ ์คํํด ๋๊ณ ํ๋ฉด ๋ฌธ์ ๋ฅผ ์ง๋จํ ๋ ์ฌ์ฉํฉ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
์คํ ์ค์ธ ์ฑ์์ ๋ค์์ ๋ฝ์๋ด ๋ณด์ฌ ์ค๋๋ค.
- ํ๋ฉด ๊ตฌ์กฐ ์ ์ฒด โ ์ด๋ค ๋ถํ๋ค์ด ์ด๋ค ์์๋ก ๊ฒน์ณ ์๋์ง(์์ ฏ ํธ๋ฆฌ)
- ์์ ธ๋์จ ์์ ์ฐพ๊ธฐ โ ํ๋ฉด ๋ฐ์ผ๋ก ๋์น ๋ถ๋ถ์ด ์ด๋์ธ์ง(overflow ์์น)
- ํ์ฌ ํ๋ฉด ์ ๋ณด โ ํ๋ฉด ํฌ๊ธฐ ๋ฑ ๊ธฐ๋ณธ ์ ๋ณด
- ํน์ ๋ถํ ๊ฒ์ โ ์ํ๋ ์ข ๋ฅ์ ์์(๋ฒํผ, ๊ธ์ ๋ฑ)๊ฐ ์ค์ ๋ก ์๋์ง
- ํ๋ฉด ์ ๋ชจ๋ ๊ธ์ โ ํ์๋๋ ํ ์คํธ์ ๊ทธ ๋ด์ฉ ๋ชจ์
์ด๋ป๊ฒ ์ฐ๋์#
# ํ๋ฉด ๊ตฌ์กฐ(์์ ฏ ํธ๋ฆฌ) ์ ์ฒด ๋ณด๊ธฐ
/inspector/ui tree
# ํ๋ฉด ๋ฐ์ผ๋ก ์์ ธ๋์จ ๋ถ๋ถ(overflow) ์ฐพ๊ธฐ
/inspector/ui overflow
# ํ์ฌ ํ๋ฉด ์ ๋ณด ๋ณด๊ธฐ
/inspector/ui screen
# ํ๋ฉด์ ์๋ ๊ธ์(ํ
์คํธ) ๋ชจ๋ ์ฐพ๊ธฐ
/inspector/ui texts
์ ๋ค ๊ฐ์ง๋ ๋ฌธ์์ ์ค์ ๋ก ์ ์๋ ์ฌ์ฉ ์์์ ๋๋ค. ๋ณดํต ๋ฌธ์ ์ ํ์ ๋ง๋ ํ ๊ฐ์ง๋ฅผ ๊ณจ๋ผ ์คํํ๋ฉด ๋ฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
๋ฌธ์ ์ข ๋ฅ์ ๋ฐ๋ผ ์ ํด์ง ์ง๋จ ์์๋ฅผ ๋ฐ๋ผ๊ฐ๋๋ค.
-
๋ ์ด์์์ด ์์ ธ๋์์ ๋ โ ์์ ธ๋์จ ์์ ฏ์ ์ฐพ์ ๊ทธ ์์น๋ฅผ ํ์ธํ๊ณ , ์ ํด์ง ํฌ๊ธฐ์ ์ค์ ํฌ๊ธฐ๋ฅผ ๋น๊ตํ ๋ค
ExpandedยทFlexibleยทSingleChildScrollView๊ฐ์ ํด๊ฒฐ์ฑ ์ ์ ์ํฉ๋๋ค. - ์์ด์ผ ํ ์์๊ฐ ์ ๋ณด์ผ ๋ โ ํด๋น ์ข ๋ฅ์ ์์ ฏ์ ๊ฒ์ํด ์ค์ ์กด์ฌ ์ฌ๋ถ๋ฅผ ํ์ธํ๊ณ , ํ๋ฉด ๊ตฌ์กฐ ๊ฒฝ๋ก๋ฅผ ๋ฐ๋ผ๊ฐ ๋ณด๋ฉฐ ์กฐ๊ฑด๋ถ๋ก ๊ฐ๋ ค์ก๋์ง ์ดํด๋ด ๋๋ค.
- ํ๋ฉด์ด ๋๋ฆด ๋ โ ํ๋ฉด ๊ตฌ์กฐ์ ๊น์ด๋ฅผ ๋ณด๊ณ ๋ถํ์ํ๊ฒ ๊น๊ฒ ์ค์ฒฉ๋ ๊ณณ์ ์ฐพ์ ๋ค, ๋ค์ ๊ทธ๋ ค์ง๋ ๋น๋๋ฅผ ์ ๊ฒํฉ๋๋ค.
- ํ๋ฉด ํฌ๊ธฐ๋ณ๋ก ๊นจ์ง ๋ โ ํ์ฌ ํ๋ฉด ํฌ๊ธฐ๋ฅผ ํ์ธํ๊ณ ์ฌ๋ฌ ํฌ๊ธฐ์์ ์์ ธ๋์ด์ ๊ฒ์ฌํด, ํฌ๊ธฐ์ ๋ฐ๋ผ ๋ถ๊ธฐ๋๋ ์กฐ๊ฑด์ ์ ๊ฒํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Triggers#
- Layout overflow
- Widget tree analysis
- UI structure check
MCP Tools#
ui_get_widget_tree#
Returns the widget tree of the current screen.
Parameters:
depth: Tree depth (default 5)includeRenderObjects: Include RenderObject info
Response example:
{
" tree " : {
" type " : " MaterialApp " ,
" children " : [
{
" type " : " Scaffold " ,
" children " : [
{ " type " : " AppBar " , " properties " : { " title " : " Home " } } ,
{ " type " : " ListView " , " children " : [...]}
]
}
]
}
}ui_find_widgets#
Searches for widgets by specific type.
Parameters:
type: Widget type name (e.g., Text, Container)key: Widget Key value
ui_get_screen_info#
Returns current screen information.
ui_find_overflow#
Finds widgets with overflow issues.
ui_get_text_widgets#
Returns all text widgets and their content.
Common Diagnostics#
Layout overflow#
1. ui_find_overflow - > Identify problem widget
2. Check the widget path
3. Compare constraints vs size
4. Suggest applying Expanded, Flexible, SingleChildScrollViewWidget not found#
1. ui_find_widgets type= " TargetWidget "
2. Verify widget existence
3. Trace widget tree path
4. Review conditional rendering logicUI performance issues#
1. ui_get_widget_tree - > Check depth
2. Identify unnecessarily deep nesting
3. Check const widget usage
4. Analyze rebuild frequency with /inspector/blocResponsive layout#
1. ui_get_screen_info - > Check screen size
2. Run ui_find_overflow at various sizes
3. Review MediaQuery-based conditionsExamples#
Check widget tree#
/inspector/ui treeOverflow inspection#
/inspector/ui overflowCheck screen info#
/inspector/ui screenFind text widgets#
/inspector/ui textsReferences#
- Detailed implementation:
.claude/agents/flutter-inspector-ui.md - Master inspector:
.claude/commands/inspector.md - BLoC inspector:
.claude/commands/inspector/bloc.md