| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[ Widget Preview ] Add analytic event that's reported when the previewer is opened (#177949) With the addition of IDE support, the widget previewer is often started by default by IDE plugins, even if users don't open the previewer. This change adds an additional analytics event which is reported once the widget preview application is loaded and connects to the DTD instance. Fixes https://github.com/flutter/flutter/issues/177948 | 11 个月前 | |
Analyzer, require 10.1.0, fix deprecations in dependency_graph.dart (#182507) <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> In analyzer 10.x.y we deprecated `returnType` and want clients to switch to `typeName`, to support primary constructors language feature. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md | 7 个月前 | |
Reland "[flutter_tools] Fix DTD "Stream already subscribed" error and wait for analysis over DTD in widget preview" (#193658) ## Description Relands https://github.com/flutter/flutter/pull/192930 (which was reverted in https://github.com/flutter/flutter/pull/193637). ### What changed since the original PR - In `AnalysisServer`, store and cancel the `stdout` and `stderr` stream subscriptions in `dispose()` before closing `_analyzingController` and `_errorsController`, and guard `_analyzingController.add` with `!_analyzingController.isClosed` in `_handleProgress`. Previously, `$/progress` notifications arriving from the language server during or after `AnalysisServer.dispose()` threw `Bad state: Cannot add new events after calling close` in `widget_preview_scaffold_test.dart`. - In `widget_preview_test_helpers.dart`, await `analysisServer.onExit` after `analysisServer.dispose()` in `addTearDown` so the analysis server process has fully exited before temporary directory cleanup on Windows. - Added a hermetic unit test in `analyze_continuously_test.dart` verifying that `AnalysisServer` does not throw when `$/progress` notifications arrive during or after `dispose()`. ### Original description During widget preview startup or file updates: 1. Concurrent calls to retrieve previews or wait for analysis (e.g., initial command startup racing with file watcher events) could concurrently invoke `_waitForLspService()`, causing duplicate `streamListen` calls to the Dart Tooling Daemon. DTD throws JSON-RPC error 103 (`Stream already subscribed`) when a client attempts to subscribe to a stream it is already listening to. 2. `WidgetPreviewDtdServices` previously considered the `Lsp` service ready as soon as *any* `Lsp` method was registered on DTD (or upon receiving the first `ServiceRegistered` event for `Lsp`). Because the analysis server registers its LSP methods sequentially before posting an `initialized` event on the `Lsp` stream, calls to `Lsp.dart/workspace/analysis/complete` or `Lsp.dart/workspace/getFlutterWidgetPreviews` could race ahead of their registration and fail with `-32601 (method not found)`. 3. When connecting to a pre-existing analysis server over DTD (`--dtd-url`), `LspPreviewDetector.analysisServer` is `null`, causing `analysisServer?.waitForAnalysis()` calls during startup and file updates to be no-ops. This change: - Deduplicates in-flight calls to `_waitForLspService()` using a shared future (`_waitForLspServiceFuture`) so concurrent callers await the same LSP registration check instead of issuing duplicate DTD requests. - Separates `lspServiceAvailable` (whether an analysis server has begun registering `Lsp` services on DTD) from `_allLspServicesRegistered` (whether all required widget preview LSP methods in `kRequiredLspServices` are registered), and updates `_waitForLspServiceHelper()` to listen for the `initialized` event on the `Lsp` stream before checking `getRegisteredServices()`. - Consolidates LSP DTD calls into `_callLspService()` and removes the `kMethodNotFound` polling loop now that `_waitForLspService()` ensures all required LSP methods are registered. - Safely catches and ignores `RpcErrorCodes.kStreamAlreadySubscribed` on `streamListen` calls in `WidgetPreviewDtdServices` (`safeStreamListen`). - Adds `WidgetPreviewDtdServices.waitForAnalysis()` (invoking `Lsp.dart/workspace/analysis/complete` over DTD), unifies `LspPreviewDetector.waitForAnalysis()` so widget preview waits for analysis completion on both tool-managed and pre-existing analysis servers, and moves the startup `waitForAnalysis()` call inside the DTD error-handling `try / catch` block in `WidgetPreviewStartCommand`. - Adds hermetic regression tests covering concurrent/pre-subscribed DTD streams, partial vs. full LSP service registration (`Lsp.initialized`), and waiting for analysis over DTD. Fixes https://github.com/flutter/flutter/issues/192424 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md | 10 天前 | |
[ Widget Preview ] Use analysis server for widget preview detection (#184473) This change ports the `flutter widget-preview start` command to utilize the Dart Analysis Server to detect widget previews in projects. When launched from an IDE, the widget previewer will use the existing DAS and DTD instances, greatly reducing the amount of memory consumed by the widget previewer. A `--legacy-preview-detection` flag has also been added to fall back to the previous in-process preview detection logic. This flag will be removed in a future release once the DAS implementation is proven to be stable. Fixes #179584 | 6 个月前 | |
Reland "[flutter_tools] Fix DTD "Stream already subscribed" error and wait for analysis over DTD in widget preview" (#193658) ## Description Relands https://github.com/flutter/flutter/pull/192930 (which was reverted in https://github.com/flutter/flutter/pull/193637). ### What changed since the original PR - In `AnalysisServer`, store and cancel the `stdout` and `stderr` stream subscriptions in `dispose()` before closing `_analyzingController` and `_errorsController`, and guard `_analyzingController.add` with `!_analyzingController.isClosed` in `_handleProgress`. Previously, `$/progress` notifications arriving from the language server during or after `AnalysisServer.dispose()` threw `Bad state: Cannot add new events after calling close` in `widget_preview_scaffold_test.dart`. - In `widget_preview_test_helpers.dart`, await `analysisServer.onExit` after `analysisServer.dispose()` in `addTearDown` so the analysis server process has fully exited before temporary directory cleanup on Windows. - Added a hermetic unit test in `analyze_continuously_test.dart` verifying that `AnalysisServer` does not throw when `$/progress` notifications arrive during or after `dispose()`. ### Original description During widget preview startup or file updates: 1. Concurrent calls to retrieve previews or wait for analysis (e.g., initial command startup racing with file watcher events) could concurrently invoke `_waitForLspService()`, causing duplicate `streamListen` calls to the Dart Tooling Daemon. DTD throws JSON-RPC error 103 (`Stream already subscribed`) when a client attempts to subscribe to a stream it is already listening to. 2. `WidgetPreviewDtdServices` previously considered the `Lsp` service ready as soon as *any* `Lsp` method was registered on DTD (or upon receiving the first `ServiceRegistered` event for `Lsp`). Because the analysis server registers its LSP methods sequentially before posting an `initialized` event on the `Lsp` stream, calls to `Lsp.dart/workspace/analysis/complete` or `Lsp.dart/workspace/getFlutterWidgetPreviews` could race ahead of their registration and fail with `-32601 (method not found)`. 3. When connecting to a pre-existing analysis server over DTD (`--dtd-url`), `LspPreviewDetector.analysisServer` is `null`, causing `analysisServer?.waitForAnalysis()` calls during startup and file updates to be no-ops. This change: - Deduplicates in-flight calls to `_waitForLspService()` using a shared future (`_waitForLspServiceFuture`) so concurrent callers await the same LSP registration check instead of issuing duplicate DTD requests. - Separates `lspServiceAvailable` (whether an analysis server has begun registering `Lsp` services on DTD) from `_allLspServicesRegistered` (whether all required widget preview LSP methods in `kRequiredLspServices` are registered), and updates `_waitForLspServiceHelper()` to listen for the `initialized` event on the `Lsp` stream before checking `getRegisteredServices()`. - Consolidates LSP DTD calls into `_callLspService()` and removes the `kMethodNotFound` polling loop now that `_waitForLspService()` ensures all required LSP methods are registered. - Safely catches and ignores `RpcErrorCodes.kStreamAlreadySubscribed` on `streamListen` calls in `WidgetPreviewDtdServices` (`safeStreamListen`). - Adds `WidgetPreviewDtdServices.waitForAnalysis()` (invoking `Lsp.dart/workspace/analysis/complete` over DTD), unifies `LspPreviewDetector.waitForAnalysis()` so widget preview waits for analysis completion on both tool-managed and pre-existing analysis servers, and moves the startup `waitForAnalysis()` call inside the DTD error-handling `try / catch` block in `WidgetPreviewStartCommand`. - Adds hermetic regression tests covering concurrent/pre-subscribed DTD streams, partial vs. full LSP service registration (`Lsp.initialized`), and waiting for analysis over DTD. Fixes https://github.com/flutter/flutter/issues/192424 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md | 10 天前 | |
flutter_tools: Use new FileSystemExtension from devtools (#190360) | 2 个月前 | |
Specify non-obvious types in pattern variable declarations (#192632) Preemptively fixes static analysis warnings reported by newer Dart SDK builds under `specify_nonobvious_local_variable_types`. Adds explicit types to pattern variable declarations in: - `dev/integration_tests/record_use_test_package/hook/link.dart` - `packages/flutter/lib/src/widgets/actions.dart` - `packages/flutter/lib/src/widgets/selectable_region.dart` - `packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart` | 16 天前 | |
refactor(flutter_tools): clean up dead unreferenced declarations (#191163) Removes dead, unreferenced internal declarations across `packages/flutter_tools`. This is a **deterministic, tool-guided cleanup** performed using [`undead`](https://pub.dev/packages/undead) (whole-program AST reachability analysis). Because candidate declarations are identified through formal analyzer graph traversals rather than generative AI synthesis, there is **almost zero risk of AI hallucinations or speculative refactoring regressions**. --- ### 🔍 How `undead` Works & Non-Breaking Safety Guarantees Unlike basic lexical lints (`unused_element`, `unused_field`) which only detect file-private (`_`) identifiers within a single compilation unit, `undead` builds a comprehensive reachability graph starting from: 1. **Public API Entrypoints**: All exported root declarations in `lib/*.dart`. 2. **Executable Roots**: Binary/CLI command entrypoints. 3. **Test Suites**: Unit and integration test harnesses in `test/`. Any internal declaration under `lib/src/` with zero reachable paths from any entrypoint or test root is flagged as dead code. #### Verification & Non-Breaking Invariants * **Public API Preservation**: All public exports in `lib/` remain strictly untouched. * **Sealed Hierarchy Protection**: Subtypes of `sealed` classes are preserved to guarantee Dart 3 pattern-matching switch exhaustiveness. * **Framework Pragmas**: Entrypoints annotated with `@pragma('vm:entry-point')` are preserved. * **Regression Verification**: Verified clean via full `flutter_tools` static analysis (`dart analyze`) and passing local test suites (`dart test`) with zero behavioral drift. --- ### 📦 Removed Declarations Removes dead unreferenced declarations identified during the codebase reachability audit: - AndroidSdkNdkHelpers, kSupportedAbis, writeLocalProperties, conflictDetected - OverrideArtifacts, kSystemCodeSuccess, kSystemCodeDeviceFull - getNameForHostPlatform, getAotBuildDirectory, getFuchsiaBuildDirectory - kXcodeBuildScriptValueBuild, kXcodeBuildScriptValueEmbed, kXcodeBuildScriptValueAddToAppBuild - getNameForTargetPlatform, getTargetPlatformForName - verifyOutputDirectories, NoOpBuildTargets, _NoOpTarget - getDefaultApplicationKernelPath, DiscoveredApp, NoIdeValidator, ValidatorWithResult - flutterMacOSFrameworkDir, OSArchitectures, _osTargets, kLuciEnvName - loadDwdsDirectory, generateMethodArguments, L10nMissingPlaceholderException - HeaderGenerator, ConstructorGenerator, kExplicitlyExcludedPackages - generateDDCBootstrapScript, parseVersionForWindows, EdgeValidator - PreviewProperty, ParsedUnitResultExtension, SourceExtension, daemon id Also removed unused imports left behind by deletions. --- ### 🤖 Tool Provenance & Reproduction Dead code detection and reachability analysis performed with [`undead`](https://pub.dev/packages/undead) (`v0.1.0`). To reproduce or re-run this reachability audit locally: ```bash cd packages/flutter_tools && dart run undead@ ``` | 1 个月前 | |
[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/`. | 1 个月前 | |
[Tool] Support glob patterns when parsing workspaces in FlutterProject (#185715) Fixes https://github.com/flutter/flutter/issues/185654 See https://dart.googlesource.com/pub/+/4e68fd9842f1204a9d556eb1d75f37350e1d851d | 4 个月前 | |
Migrate remaining `flutter_tools` templates & `widget_preview_scaffold` to `[material|cupertino]_ui` (#193099) Follow-up to #192947 in preparation for deprecating `package:flutter/material.dart` and `package:flutter/cupertino.dart` Part of un-blocking #192957 This PR migrates the remaining `flutter_tools` templates and test fixtures that run `flutter analyze` so they do not trigger `deprecated_member_use` diagnostics when the design libraries in `package:flutter` are deprecated: 1. **module template**: - Migrates `lib/main.dart.tmpl` and `test/widget_test.dart.tmpl` to `material_ui`. 2. **widget_preview_scaffold**: - Migrates the `widget_preview_scaffold` template files, hydrated scaffold sources, and tests to `material_ui` and `cupertino_ui`. 3. **analyze_once_test.dart **: - Migrates the synthetic `mainDartSrc` fixture from `package:flutter/material.dart` to `package:flutter/widgets.dart` (`WidgetsApp`), since `createDotPackages()` constructs a minimal `.dart_tool/package_config.json` containing only `flutter` and `sky_engine`. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md | 21 天前 | |
refactor(flutter_tools): clean up dead unreferenced declarations (#191163) Removes dead, unreferenced internal declarations across `packages/flutter_tools`. This is a **deterministic, tool-guided cleanup** performed using [`undead`](https://pub.dev/packages/undead) (whole-program AST reachability analysis). Because candidate declarations are identified through formal analyzer graph traversals rather than generative AI synthesis, there is **almost zero risk of AI hallucinations or speculative refactoring regressions**. --- ### 🔍 How `undead` Works & Non-Breaking Safety Guarantees Unlike basic lexical lints (`unused_element`, `unused_field`) which only detect file-private (`_`) identifiers within a single compilation unit, `undead` builds a comprehensive reachability graph starting from: 1. **Public API Entrypoints**: All exported root declarations in `lib/*.dart`. 2. **Executable Roots**: Binary/CLI command entrypoints. 3. **Test Suites**: Unit and integration test harnesses in `test/`. Any internal declaration under `lib/src/` with zero reachable paths from any entrypoint or test root is flagged as dead code. #### Verification & Non-Breaking Invariants * **Public API Preservation**: All public exports in `lib/` remain strictly untouched. * **Sealed Hierarchy Protection**: Subtypes of `sealed` classes are preserved to guarantee Dart 3 pattern-matching switch exhaustiveness. * **Framework Pragmas**: Entrypoints annotated with `@pragma('vm:entry-point')` are preserved. * **Regression Verification**: Verified clean via full `flutter_tools` static analysis (`dart analyze`) and passing local test suites (`dart test`) with zero behavioral drift. --- ### 📦 Removed Declarations Removes dead unreferenced declarations identified during the codebase reachability audit: - AndroidSdkNdkHelpers, kSupportedAbis, writeLocalProperties, conflictDetected - OverrideArtifacts, kSystemCodeSuccess, kSystemCodeDeviceFull - getNameForHostPlatform, getAotBuildDirectory, getFuchsiaBuildDirectory - kXcodeBuildScriptValueBuild, kXcodeBuildScriptValueEmbed, kXcodeBuildScriptValueAddToAppBuild - getNameForTargetPlatform, getTargetPlatformForName - verifyOutputDirectories, NoOpBuildTargets, _NoOpTarget - getDefaultApplicationKernelPath, DiscoveredApp, NoIdeValidator, ValidatorWithResult - flutterMacOSFrameworkDir, OSArchitectures, _osTargets, kLuciEnvName - loadDwdsDirectory, generateMethodArguments, L10nMissingPlaceholderException - HeaderGenerator, ConstructorGenerator, kExplicitlyExcludedPackages - generateDDCBootstrapScript, parseVersionForWindows, EdgeValidator - PreviewProperty, ParsedUnitResultExtension, SourceExtension, daemon id Also removed unused imports left behind by deletions. --- ### 🤖 Tool Provenance & Reproduction Dead code detection and reachability analysis performed with [`undead`](https://pub.dev/packages/undead) (`v0.1.0`). To reproduce or re-run this reachability audit locally: ```bash cd packages/flutter_tools && dart run undead@ ``` | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 11 个月前 | ||
| 7 个月前 | ||
| 10 天前 | ||
| 6 个月前 | ||
| 10 天前 | ||
| 2 个月前 | ||
| 16 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 21 天前 | ||
| 1 个月前 |