Ben Konyi a78aefa9bc
[ Widget Preview ] Pass DTD URI as a constant in a generated file (#179821)
Passing the DTD URI via a Dart define results in a new
`<hash>.cache.dill.track.dill` being created on each run as the DTD URI
is never the same and the `cache.dill.track.dill` hash is partly based
on the set of Dart defines. These files are not cleaned up
automatically, so they could take up a significant amount of memory over
time.

This change adds an additional code generation step to the widget
previewer which populates
`widget_preview_scaffold/lib/src/dtd/dtd_connection_info.dart` with a
constant containing the DTD URI provided by the tool.

Fixes https://github.com/flutter/flutter/issues/179139
2025-12-15 15:01:29 +00:00
..