SIGN IN SIGN UP

[flutter_tools] Resolve symlinks and fix flakiness in widget preview tests (#191214)

## Description
* Resolve symbolic links in `PreviewDetector`'s project root directory
and ephemeral directories to ensure consistent path matching.
* Pass the SDK path to `AnalysisContextCollection` to ensure correct SDK
resolution in worktrees.
* Add a 100ms delay in test helpers before triggering file changes to
allow the file watcher to fully initialize on macOS.

## Related Issues
Fixes https://github.com/flutter/flutter/issues/189849

## Tests
- Updated widget preview unit and regression tests in
`packages/flutter_tools/test/commands.shard/hermetic/widget_preview/`
and
`packages/flutter_tools/test/commands.shard/permeable/widget_preview/`.
B
Ben Konyi committed
3700590629631d2d905216ab4c5a356b508dc886
Parent: 14002a4
Committed by GitHub <noreply@github.com> on 8/25/2026, 6:34:06 PM