Commit 4baf4b4
authored
[ Widget Preview ] Refactor
This change makes the detection of `@Preview(...)` annotations more
robust by converting the analyzer AST directly to generated code rather
than simply copying and pasting the original source. This allows for
proper handling of the following cases WRT import prefixing:
- The use of `const`
- String interpolation
- Other uses of constant variables in non-trivial contexts
- Etc.@Preview() detection and code generation (flutter#168307)1 parent 7568202 commit 4baf4b4
7 files changed
Lines changed: 711 additions & 343 deletions
File tree
- packages/flutter_tools
- lib/src/widget_preview
- test
- commands.shard
- hermetic/widget_preview
- permeable
- general.shard/widget_preview
0 commit comments