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
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.
Steps to repro:
git clone https://github.com/bkonyi/widget_preview_study
cd widget_preview_study/widget_preview
flutter pub get
cd ../veggieseasons
flutter pub get
widget_preview_study/veggieseasons
in your IDEveggie_card.dart
dart run ../widget_preview/bin/find_previews.dart
in IDE terminalExpected: 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 hiddenActual: Widgets defined in
veggie_card.dart
are considered implementation widgets, and hidden in the inspector treeNote: 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
.The text was updated successfully, but these errors were encountered: