flutter/packages/flutter_tools/test/widget_preview_scaffold.shard/README.md
Ben Konyi d6c0d6fee7
[ Widget Previews ] Add widget_preview_scaffold.shard to test the widget_preview_scaffold template contents (#166358)
Adds a new `widget_preview_scaffold.shard` directory which contains a
hydrated `widget_preview_scaffold` template. This will allow for us to
write widget tests against the widgets defined in the templates.

This PR doesn't add any widget tests and is only adding the ability to
run these tests in follow up changes.

Fixes https://github.com/flutter/flutter/issues/166416
2025-04-04 18:43:52 +00:00

712 B

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.