| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Remove legacy gen_defaults analyze checks (#191629) Related to https://github.com/flutter/flutter/issues/184950 This PR is to remove the legacy `gen-defaults-names` and `gen-defaults-up-to-date` analyze checks from Flutter CI. These checks validate `dev/tools/gen_defaults`, which has become legacy and only targets the frozen SDK Material library under `packages/flutter/lib/src/material`. Material development has moved to the standalone `material_ui` packages in `flutter/packages`, and we introduced new `gen_defaults` script in flutter/packages, so these check for old script is not useful at all. This PR also removes the now-unused helper methods and their test coverage. TODO: the old `gen_defaults` tool should eventually be deprecated and removed. ## 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 documentation (doc comments with `///`). - [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. | 1 个月前 | |
Update tokens to v6.1 (#153722) This PR is to update the token version to v6.1. * This version fixes https://github.com/flutter/flutter/issues/153271 * Change the chip default border color from `ColorScheme.outline` to `ColorScheme.outlineVariant`. The Chips' border color is softened to improve visual hierarchy between chips and buttons | 2 年前 | |
Introduce new Material 3 `Slider` shapes (#152237) fixes [Update `Slider` for Material 3 redesign](https://github.com/flutter/flutter/issues/141842) previous implementation https://github.com/flutter/flutter/pull/147783 ### Description This PR introduces new Material 3 Slider design. ### Slider Preview <img width="912" alt="Screenshot 2024-07-24 at 16 38 11" src="https://github.com/user-attachments/assets/9645ff6c-b72a-40aa-ae95-4f76994f8302"> <img width="912" alt="Screenshot 2024-07-24 at 16 38 24" src="https://github.com/user-attachments/assets/fbaed8bb-2717-43a9-9415-ea1365165d9a"> ### Value indicator Preview https://github.com/user-attachments/assets/45fa001c-de81-433a-a8e9-6c0d6a2335c0 ### New stop indicator https://github.com/user-attachments/assets/ad05621d-042d-4b17-9dbb-7f7b802a2593 ### Customized <img width="912" alt="Screenshot 2024-07-24 at 16 41 49" src="https://github.com/user-attachments/assets/2f279240-5af8-4bc8-9c65-a4b4ac718101"> ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [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 documentation (doc comments with `///`). - [x] 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. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- 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 | 1 年前 | |
Replace BorderRadius.circular with const BorderRadius.all and update documentation examples (#183074) This PR replaces usages of `BorderRadius.circular(double radius)` with `const BorderRadius.all(Radius.circular(radius))` (and similarly for `BorderRadiusDirectional` and `BorderRadiusGeometry`) to improve code consistency and enable const constructors where applicable. Additionally, all code examples in the documentation have been updated to reflect this pattern, ensuring that developers see the recommended style. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [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]. - [ ] 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 | 6 个月前 | |
Modernize framework lints (#179089) WIP Commits separated as follows: - Update lints in analysis_options files - Run `dart fix --apply` - Clean up leftover analysis issues - Run `dart format .` in the right places. Local analysis and testing passes. Checking CI now. Part of https://github.com/flutter/flutter/issues/178827 - Adoption of flutter_lints in examples/api coming in a separate change (cc @loic-sharma) ## Pre-launch Checklist - [ ] 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]. - [ ] 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 | 9 个月前 | |
Deprecate legacy gen_defaults tool (#191911) Related to #184950 This PR is to deprecate the legacy `dev/tools/gen_defaults` tool. The PR: * stops the framework test shard from running the legacy `dev/tools/gen_defaults` unit tests. * marks the legacy tool as deprecated in its README * points developers to `packages/material_ui/tool/gen_defaults` in `flutter/packages` ## 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 documentation (doc comments with `///`). - [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. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> | 29 天前 | |
Really disable shuffling for gen_defaults tests (#142721) https://github.com/flutter/flutter/issues/142716 | 2 年前 | |
Bump Dart to 3.13, reformat, re-enable formatting check (#192649) Fixes https://github.com/flutter/flutter/issues/191628 Fixes https://github.com/flutter/flutter/issues/187204 Bumps Dart across the repo to 3.13 and reformats the repo The CI formatting check is also re-enabled with this change. #### Deviating pubspec.yaml Packages The following packages deviate from the standard repository Dart SDK constraint (^3.11.0-0 before the bump). Some of these cannot cleanly downgrade. Changing them is considered out of scope. Some of them may also pertain to active work that requires later versions of Dart. 1. ios_universal_link - Full File Path: dev/integration_tests/ios_universal_link/pubspec.yaml - Dart SDK Version: ^3.14.0-53.0.dev - Author: @okorohelijah - Commit: 2a071e20324 (2026-09-04) - PR / Message: Add iOS Universal Link integration test (Simulator) (#191443) 2. flutter_analyzer_plugin - Full File Path: dev/flutter_analyzer_plugin/pubspec.yaml - Dart SDK Version: ^3.7.0 - Author: @bkonyi - Commit: ae9963e8024 (2026-08-12) - PR / Message: [analysis] Reland "Added initial implementation of the flutter_analyzer_plugin (#175679)" (#191022) 3. widget_preview_scaffold - Full File Path: dev/integration_tests/widget_preview_scaffold/pubspec.yaml - Dart SDK Version: ^3.12.0 - Author: @polina-c - Commit: 3ca99c34868 (2026-05-15) - PR / Message: [ Widget Preview ] Improve zoom behavior and add zoom slider (#186422) 4. hybrid_platform_views - Full File Path: dev/integration_tests/hybrid_android_views/pubspec.yaml - Dart SDK Version: ^3.7.0-0 - Author: @andrewkolos - Commit: 112f1704d1e (2026-03-09) - PR / Message: Reland hybrid views test (#181336) 5. record_use_test_app - Full File Path: dev/integration_tests/record_use_test_app/pubspec.yaml - Dart SDK Version: >=3.5.0-0 <4.0.0 - Author: @dcharkes - Commit: eb6acab7f31 (2026-04-09) - PR / Message: [record_use] Add experimental flag and test project (#184719) 6. record_use_test_package - Full File Path: dev/integration_tests/record_use_test_package/pubspec.yaml - Dart SDK Version: >=3.5.0-0 <4.0.0 - Author: @dcharkes - Commit: eb6acab7f31 (2026-04-09) - PR / Message: [record_use] Add experimental flag and test project (#184719) 7. data_asset_app - Full File Path: dev/integration_tests/data_asset_app/pubspec.yaml - Dart SDK Version: >=3.5.0-0 <4.0.0 - Author: @dcharkes - Commit: a0924c76b0f (2026-04-07) - PR / Message: Reland "[data_assets] Cleanup tests" (#184714) 8. data_asset_package - Full File Path: dev/integration_tests/data_asset_package/pubspec.yaml - Dart SDK Version: >=3.5.0-0 <4.0.0 - Author: @dcharkes - Commit: a0924c76b0f (2026-04-07) - PR / Message: Reland "[data_assets] Cleanup tests" (#184714) ## 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 | 14 天前 | |
Improve defaults generation with logging, stats, and token validation (#128244) ## Description This improves defaults generation with logging, stats, and token validation. This PR includes these changes: * introduce `TokenLogger`, with a verbose mode * prints versions and tokens usage to the console * outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google * find token files in `data` automatically * hide tokens `Map` * tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`. * tokens can be checked for existence with `tokenAvailable` * remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version * improve documentation ## Related Issues - Fixes https://github.com/flutter/flutter/issues/122602 ## Tests - Added tests for `TokenLogger` - Regenerated tokens, no-op except version removal ## Future work A future PR should replace or remove the following invalid tokens usages <img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00"> | 3 年前 |
Legacy Token Defaults Generator
Warning
This legacy tool is deprecated. It only targets the frozen SDK Material library
under packages/flutter/lib/src/material, and should not be used for new
Material defaults work.
Active Material defaults generation has moved to the standalone material_ui
package in the flutter/packages repository. Use
packages/material_ui/tool/gen_defaults
there instead.
Legacy Usage
Run this program from the root of the git repository:
dart dev/tools/gen_defaults/bin/gen_defaults.dart [-v]
This updates generated/used_tokens.csv and the frozen SDK Material component
theme files.
Templates
There is a template file for every component that needs defaults from
the token database. These templates are implemented as subclasses of
TokenTemplate. This base class provides some utilities and a structure
for adding a new block of generated code to the bottom of a given file.
Templates need to override the generate method to provide the generated
code block as a string.
See lib/fab_template.dart for an example that generates defaults for the
Floating Action Button.
Tokens
Tokens are stored in JSON files in data/, and are sourced from
an internal Google database.
template.dart should provide nearly all useful token resolvers
(e.g. color, shape, etc.). For special cases in which one shouldn't
be defined, use getToken to get the raw token value. The script, through
the various revolvers and getToken, validates tokens, keeps track of
which tokens are used, and generates generated/used_tokens.csv.