Feature Request: Search widget tree by error chain path
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- dart
- Área
- developer-experience, tooling
Línea de trabajo
Start with the Inspector's existing search bar and widget-tree search behavior. Trace how a single widget name is matched, then determine how the tree can support ancestor-chain parsing with ← or ◂ separators and partial matching. Done means the example chain locates the matching node or nodes, highlights them, and scrolls the Inspector to the result.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When a layout error occurs (e.g., RenderFlex overflowed), Flutter prints a widget ancestor chain like:
SizedBox ← Flexible ← Stack ← Row ← Padding ← DecoratedBox ← ConstrainedBox ← Container
Currently, there is no way to paste this chain into DevTools to locate the exact widget node in the Inspector tree. The existing search only matches a single widget name, which returns dozens of results for common widgets like SizedBox or Padding.
Proposed Solution
Add a "Search by widget chain" mode in the Inspector's search bar that:
Accepts a widget ancestor chain (using ← or ◂ as separators, matching Flutter's error output format)
Walks the widget tree and finds nodes whose ancestor path matches the given chain
Highlights and scrolls to the matching node(s)
Example
Given this error output:
SizedBox ← Flexible ← Stack ← Row
The search would find SizedBox nodes that have Flexible as parent, then Stack, then Row — and jump to the matching location in the tree.
Why This Is Useful
Direct error-to-inspector workflow: Copy the chain from the error console → paste into DevTools → land on the exact widget. No manual tree navigation needed.
Eliminates ambiguity: Searching for SizedBox alone may return 50+ results. The chain narrows it to the exact instance.
Partial matching: The chain from the error is often a subset of the full tree. The algorithm should support subsequence matching (the chain nodes appear in order but not necessarily adjacent in the full tree).
Additional Context
The widget chain format is already standardized in Flutter's error output, so no new format needs to be invented.
This could be a separate search mode (e.g., toggled by a button next to the search bar, or auto-detected when ← is present in the query).
The chain in errors sometimes includes RenderObject names — the search could optionally strip or ignore those.
Contribution
I'm interested in implementing this feature. Happy to be assigned and submit a PR if the team approves the approach.
- Lenguaje dominante
- Dart
- Estrellas
- 1.7k
- Forks
- 405
- Merge medio
- 4 d 21 h
- PR fusionados (30 d)
- 15
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flutter/devtools
-
cleanup P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
`dcm analyze` false positives Abiertoa: quality cost: low P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
contributions welcome cross-screen inspector-2.0-polish P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Support removing storage keys Abiertocross-screen P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
documentation good first issue P2
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Todos los issues de flutter/devtools
Issues similares
-
[Bug]: New version of nm package Abiertobug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
fluttercommunity/plus_plugins#3979 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
from.page-issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
enhancement UI: Material
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Notsfsssf/pixez-flutter#1360 ·
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100