You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Widget Previews] Widget inspector hides widgets from user's local project in implementation widgets #8807
open widget_preview_study/veggieseasons in your IDE
add code below to veggie_card.dart
run dart run ../widget_preview/bin/find_previews.dart in IDE terminal
look for VM service URI and copy it
launch devtools from IDE, then paste in VM service URI
open the inspector
Expected: Widgets defined in veggie_card.dart should be considered part of the local project, and shown in the inspector tree when the implementation widgets are hidden Actual: Widgets defined in veggie_card.dart are considered implementation widgets, and hidden in the inspector tree
Note: This is because we detect the pub root directory to be the preview scaffold, therefore anything outside of the preview scaffold is ignored:
@bkonyi for widget previews, will the preview scaffold always match the path /flutter/app/directory/.dart_tool/preview_scaffold? If so, we could check if the pub root ends with .dart_tool/preview_scaffold and instead set it to be the parent directory of .dart_tool.
Activity
elliette commentedon Jan 24, 2025
From @bkonyi: "The generated project's name isn't stable yet, but I'm using widget_preview_scaffold for now and it'll live under .dart_tool/"