flutter/packages/flutter_tools/test/widget_preview_scaffold.shard
Elliott Brooks 78a2a3fa67
[Widget Inspector] Add on-device button for changing default "tap" behavior (#167677)
Fixes https://github.com/flutter/flutter/issues/166118

Adds a second button to the on-device inspector that allows a developer
to temporarily disable the default "tap triggers widget selection"
behavior without fully exiting out of widget selection mode. Fixes an
issue where enabling/disabling widget selection is destructive for some
app set-ups, causing the developer's app to lose state.

## Demo


![new_widget_selection_gif](https://github.com/user-attachments/assets/4f2e96fe-2478-4254-8fe5-4023598f1a5e)

## Material screenshots

### Dark mode

<img width="130" alt="Screenshot 2025-04-23 at 12 22 41 PM"
src="https://github.com/user-attachments/assets/e643fd26-6bcb-43a2-a718-191e1831345f"
/>

<img width="113" alt="Screenshot 2025-04-23 at 12 22 48 PM"
src="https://github.com/user-attachments/assets/5ac81455-64f0-4f07-9b36-b8fd498a9669"
/>

### Light mode

<img width="105" alt="Screenshot 2025-04-23 at 12 21 46 PM"
src="https://github.com/user-attachments/assets/49c67f6f-7d90-4758-83e9-ed8bf5505bae"
/>

<img width="108" alt="Screenshot 2025-04-23 at 12 21 55 PM"
src="https://github.com/user-attachments/assets/aeca0178-872d-441e-ae5f-e9b469d83d60"
/>

## Cupertino screenshots

<img width="399" alt="Screenshot 2025-04-22 at 2 21 46 PM"
src="https://github.com/user-attachments/assets/0ad45cee-15cf-45af-9fa0-c0955296aa29"
/>

### Dark mode

<img width="134" alt="Screenshot 2025-04-23 at 12 20 19 PM"
src="https://github.com/user-attachments/assets/9b34a6c2-5308-465e-b842-0fb180d25865"
/>

<img width="123" alt="Screenshot 2025-04-23 at 12 20 26 PM"
src="https://github.com/user-attachments/assets/7c601831-91c8-440e-98ae-070444574ff9"
/>


### Light mode

<img width="106" alt="Screenshot 2025-04-22 at 2 21 38 PM"
src="https://github.com/user-attachments/assets/517839d5-25d8-42e7-a9b9-f35a77725afc"
/>

<img width="103" alt="Screenshot 2025-04-22 at 2 21 55 PM"
src="https://github.com/user-attachments/assets/390f0b0f-1a9b-4880-b686-fabe102fe7b6"
/>
2025-05-05 19:58:23 +00:00
..
widget_preview_scaffold [Widget Inspector] Add on-device button for changing default "tap" behavior (#167677) 2025-05-05 19:58:23 +00:00
.gitignore
README.md
update_widget_preview_scaffold.dart [ Widget Preview ] Add support for "soft" restart of individual previews (#166846) 2025-04-10 16:20:11 +00:00

Widget Preview Scaffold Testing

This directory contains a hydrated instance of the widget_preview_scaffold project template that's used for generating the environment used by flutter widget-preview start to host Widget Previews, as well as utilities to detect if the hydrated instance is outdated when compared to the template files.

Updating the Hydrated Template

If any of the widget_preview_scaffold template files are updated, widget_preview_scaffold/test/template_change_detection_smoke_test.dart will fail to indicate that the hydrated scaffold needs to be regenerated. To do this, run dart test/widget_preview_scaffold.shard/update_widget_preview_scaffold.dart to regenerate the project.