Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Request: Search widget tree by error chain path

オープン
#10,012 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
dart

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Dart
スター
1.7k
フォーク
405
平均マージ
4日 21時間
マージ済み PR(30日)
15

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flutter/devtools のほかの issue

flutter/devtools の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。