Skip to content

Commit 4baf4b4

Browse files
authored
[ Widget Preview ] Refactor @Preview() detection and code generation (flutter#168307)
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.
1 parent 7568202 commit 4baf4b4

7 files changed

Lines changed: 711 additions & 343 deletions

File tree

0 commit comments

Comments
 (0)