)]}'
{
  "commit": "d3bf7f7a721b64253d97ff3bdfafb97e598cb168",
  "tree": "a21d19b815f3eb1d1bafdbd4b1d40c1a1feebc1d",
  "parents": [
    "24e321d4c74b9be30ae8f8d6ce77cf73756ac06b"
  ],
  "author": {
    "name": "Muhammad Kamel",
    "email": "mu7ammadkamel@hotmail.com",
    "time": "Fri Jun 12 23:08:45 2026 +0300"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jun 12 20:08:45 2026 +0000"
  },
  "message": "Scope widget inspector overlay to the selected widget\u0027s modal route (#186784)\n\nWhen a widget inside a **modal route** (bottom sheet, dialog, etc.) is\nselected in the widget inspector, the on-device overlay (selection box,\nlayout guide lines, and tooltip) was drawn across the **entire screen**,\nincluding over the scaffold behind the modal. That made inspection\nmisleading while a modal was open.\n\nThis PR scopes inspector overlay behavior to the selected widget’s\n**modal route**:\n\n- **`_inspectAt`**: filters hit-test `selection.candidates` to the\nactive modal route scope (prefers the current route when present;\notherwise uses the smallest-area hit’s route; excludes offstage routes).\n- **`_InspectorOverlayLayer`**: skips drawing overlay candidates that do\nnot share the selected render object’s `ModalRoute`.\n- **`InspectorSelection.clearOverlayCandidates()`**: clears stale\ncandidates when selection is updated via tools (`setSelection`), without\nclearing `current` / `currentElement`.\n\n**Before:** selecting a sheet widget could show guide lines over\nmain-screen widgets behind the sheet.\n\n**After:** overlay candidates and painted guides stay within the modal\nroute scope. Manual verification: `examples/inspector_overlay_repro`\n(optional reviewer aid).\n\nNo DevTools changes are required; the overlay is painted in\n`widget_inspector.dart`.\n\nFixes #186782\n\n## Pre-launch Checklist\n\n- [ ] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [ ] I read the [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\n- [ ] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [ ] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [ ] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [ ] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [ ] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [ ] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\nIf this change needs to override an active code freeze, provide a\ncomment explaining why. The code freeze workflow can be overridden by\ncode reviewers. See pinned issues for any active code freezes with\nguidance.\n\n**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[AI contribution guidelines]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8378fc1cf223a000acc34b2087469835cdaf3fa2",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/widgets/widget_inspector.dart",
      "new_id": "a27db16b35e3c3beaa02c138cdd5f143de14c72f",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/widgets/widget_inspector.dart"
    },
    {
      "type": "modify",
      "old_id": "7b588cbb667fc014f2d561a08a24b52c05ada862",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/widgets/widget_inspector_test.dart",
      "new_id": "aa7a25f61456d46cef9c140a3e3d5ef01df9c8bb",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/widgets/widget_inspector_test.dart"
    }
  ]
}
