这是indexloc提供的服务,不要输入任何密码
Skip to content

Deprecate: Mark AppBarTheme & AppBarThemeData color parameter as deprecated in favor of backgroundColor #170624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 2, 2025

Conversation

rkishan516
Copy link
Contributor

Deprecate: Mark AppBarTheme color parameter as deprecated in favor of backgroundColor
fixes: #169918

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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jun 14, 2025
@rkishan516 rkishan516 force-pushed the app-bar-theme-color branch 2 times, most recently from ab3969c to 44fb604 Compare June 14, 2025 03:54
@rkishan516 rkishan516 marked this pull request as ready for review June 14, 2025 03:55
@dkwingsmt dkwingsmt requested a review from QuncCccccc June 18, 2025 18:41
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Since AppbarThemeData also has this property now, maybe we can deprecate it as well:)

We might also want to add tests in /Users/quncheng/Desktop/flutter/packages/flutter/test_fixes/material/app_bar_theme.dart and /Users/quncheng/Desktop/flutter/packages/flutter/test_fixes/material/app_bar_theme.dart.expect to make sure the dart fix works.

@rkishan516 rkishan516 force-pushed the app-bar-theme-color branch from 44fb604 to b3514de Compare June 25, 2025 05:00
@rkishan516 rkishan516 changed the title Deprecate: Mark AppBarTheme color parameter as deprecated in favor of backgroundColor Deprecate: Mark AppBarTheme & AppBarThemeData color parameter as deprecated in favor of backgroundColor Jun 25, 2025
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the c: tech-debt Technical debt, code quality, testing, etc. label Jun 25, 2025
@rkishan516
Copy link
Contributor Author

rkishan516 commented Jun 25, 2025

Thank you for your contribution! Since AppbarThemeData also has this property now, maybe we can deprecate it as well:)

We might also want to add tests in /Users/quncheng/Desktop/flutter/packages/flutter/test_fixes/material/app_bar_theme.dart and /Users/quncheng/Desktop/flutter/packages/flutter/test_fixes/material/app_bar_theme.dart.expect to make sure the dart fix works.

Thanks for review @QuncCccccc, I have added deprecation for AppBarThemeData and also added tests as per your review.

@chunhtai
Copy link
Contributor

Since this is depreciation, we should have a migration guide even if the migration is to run dart fix. follow this https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#handling-breaking-changes

template https://github.com/flutter/website/blob/main/src/content/release/breaking-changes/template.md

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except we need a migration guide in flutter/website

@dkwingsmt dkwingsmt requested a review from QuncCccccc June 25, 2025 18:19
@QuncCccccc
Copy link
Contributor

we need a migration guide in flutter/website

@chunhtai Just have a question, if we are not actively removing the deprecated APIs, just marking them as deprecated, do we still need the migration guide?

Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Sorry I thought I had approved it:)

@chunhtai
Copy link
Contributor

@chunhtai Just have a question, if we are not actively removing the deprecated APIs, just marking them as deprecated, do we still need the migration guide?

yes, marking deprecation should be accompanied with a migration guide.

@rkishan516 rkishan516 force-pushed the app-bar-theme-color branch from 9e16e2c to a9e28b8 Compare June 26, 2025 05:21
@rkishan516
Copy link
Contributor Author

@chunhtai I have created migration guide in website PR.

@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 2, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jul 2, 2025
Merged via the queue into flutter:master with commit 59ba308 Jul 2, 2025
71 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
…ecated in favor of backgroundColor (flutter#170624)

Deprecate: Mark AppBarTheme color parameter as deprecated in favor of
backgroundColor
fixes: flutter#169918

## 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].
- [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: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: tech-debt Technical debt, code quality, testing, etc. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate and remove color parameter in AppBarTheme constructor and copyWith method
4 participants