-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Normalize AppBarTheme #169130
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
Normalize AppBarTheme #169130
Conversation
2465ff1 to
fdc4855
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
QuncCccccc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this normalization! LGTM:)
a2f78a8 to
a6b93c2
Compare
6c6feff to
f1112fa
Compare
eb70cb1 to
409ba3d
Compare
QuncCccccc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! As for the google testing failures, I'll create g3fix when I come back:)! Thanks!
|
Attached a g3fix cl/766370276 |
|
autosubmit label was removed for flutter/flutter/169130, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Signed-off-by: huycozy <[email protected]>
Signed-off-by: huycozy <[email protected]>
Signed-off-by: huycozy <[email protected]>
Signed-off-by: huycozy <[email protected]>
860e402 to
018c4ae
Compare
flutter/flutter@c7362b4...0ab008a 2025-06-22 [email protected] Roll Skia from 203469ef4672 to fcd1c55da9cc (1 revision) (flutter/flutter#170986) 2025-06-22 [email protected] Roll Dart SDK from e5db5e0f81ba to 98db1db5ff65 (2 revisions) (flutter/flutter#170979) 2025-06-21 [email protected] Normalize input decoration theme (flutter/flutter#168981) 2025-06-21 [email protected] Roll Skia from dceb857b1c47 to 203469ef4672 (1 revision) (flutter/flutter#170959) 2025-06-21 [email protected] Roll Dart SDK from 6325aeacaef4 to e5db5e0f81ba (1 revision) (flutter/flutter#170958) 2025-06-21 [email protected] Roll Dart SDK from a6a3d65e33d7 to 6325aeacaef4 (2 revisions) (flutter/flutter#170955) 2025-06-21 [email protected] Roll Skia from 773188560221 to dceb857b1c47 (1 revision) (flutter/flutter#170954) 2025-06-21 [email protected] Roll Dart SDK from 750eaa028445 to a6a3d65e33d7 (1 revision) (flutter/flutter#170953) 2025-06-21 [email protected] Fix the Japanese IME problem on macOS reported in the following issue. (flutter/flutter#166291) 2025-06-21 [email protected] Roll Fuchsia Test Scripts from IfPORaYjQ2zP4bcq-... to 2wEtX_lDNhHhDNsP6... (flutter/flutter#170946) 2025-06-20 [email protected] Roll Skia from 104460420c48 to 773188560221 (2 revisions) (flutter/flutter#170942) 2025-06-20 [email protected] Normalize AppBarTheme (flutter/flutter#169130) 2025-06-20 [email protected] Close CupertinoContextMenu overlay if the widget is disposed or a new route is pushed (flutter/flutter#170186) 2025-06-20 [email protected] Roll Dart SDK from a554bdd0a2cc to 750eaa028445 (1 revision) (flutter/flutter#170933) 2025-06-20 [email protected] Roll Skia from b638003de37e to 104460420c48 (1 revision) (flutter/flutter#170932) 2025-06-20 [email protected] Roll Packages from 0ec4053 to 7f41e75 (1 revision) (flutter/flutter#170925) 2025-06-20 [email protected] Roll Skia from f1e68950ea7b to b638003de37e (5 revisions) (flutter/flutter#170923) 2025-06-20 [email protected] [licenses_cpp] jun17 (flutter/flutter#170845) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#9472) flutter/flutter@c7362b4...0ab008a 2025-06-22 [email protected] Roll Skia from 203469ef4672 to fcd1c55da9cc (1 revision) (flutter/flutter#170986) 2025-06-22 [email protected] Roll Dart SDK from e5db5e0f81ba to 98db1db5ff65 (2 revisions) (flutter/flutter#170979) 2025-06-21 [email protected] Normalize input decoration theme (flutter/flutter#168981) 2025-06-21 [email protected] Roll Skia from dceb857b1c47 to 203469ef4672 (1 revision) (flutter/flutter#170959) 2025-06-21 [email protected] Roll Dart SDK from 6325aeacaef4 to e5db5e0f81ba (1 revision) (flutter/flutter#170958) 2025-06-21 [email protected] Roll Dart SDK from a6a3d65e33d7 to 6325aeacaef4 (2 revisions) (flutter/flutter#170955) 2025-06-21 [email protected] Roll Skia from 773188560221 to dceb857b1c47 (1 revision) (flutter/flutter#170954) 2025-06-21 [email protected] Roll Dart SDK from 750eaa028445 to a6a3d65e33d7 (1 revision) (flutter/flutter#170953) 2025-06-21 [email protected] Fix the Japanese IME problem on macOS reported in the following issue. (flutter/flutter#166291) 2025-06-21 [email protected] Roll Fuchsia Test Scripts from IfPORaYjQ2zP4bcq-... to 2wEtX_lDNhHhDNsP6... (flutter/flutter#170946) 2025-06-20 [email protected] Roll Skia from 104460420c48 to 773188560221 (2 revisions) (flutter/flutter#170942) 2025-06-20 [email protected] Normalize AppBarTheme (flutter/flutter#169130) 2025-06-20 [email protected] Close CupertinoContextMenu overlay if the widget is disposed or a new route is pushed (flutter/flutter#170186) 2025-06-20 [email protected] Roll Dart SDK from a554bdd0a2cc to 750eaa028445 (1 revision) (flutter/flutter#170933) 2025-06-20 [email protected] Roll Skia from b638003de37e to 104460420c48 (1 revision) (flutter/flutter#170932) 2025-06-20 [email protected] Roll Packages from 0ec4053 to 7f41e75 (1 revision) (flutter/flutter#170925) 2025-06-20 [email protected] Roll Skia from f1e68950ea7b to b638003de37e (5 revisions) (flutter/flutter#170923) 2025-06-20 [email protected] [licenses_cpp] jun17 (flutter/flutter#170845) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR is to make `AppBarTheme` conform to Flutter Material's
conventions for component themes:
- Added a `AppBarThemeData` class which defines overrides for the
defaults for `AppBar` properties.
- Added AppBarTheme constructor parameters: `AppBarThemeData? data` and
`Widget? child`. This is now the preferred way to configure a
`AppBarTheme`:
```dart
AppBarTheme(
data: AppBarThemeData(),
child: Scaffold(
appBar: AppBar(
title: xxx,
leading: xxx,
actions: xxx,
),
),
```
These two properties are made nullable to not break existing apps which
has customized `ThemeData.appBarTheme`.
- Update `AppBarTheme` to be an `InheritedWidget` subclass.
- Changed the type of component theme defaults from `AppBarTheme` to
`AppBarThemeData`.
- Add new tests for `AppBarThemeData` and update the existing
`AppBarTheme` tests.
- This also temporarily changes `AppBarThemeData` to `Object?` in
`ThemeData` class, to bypass g3 tests, following
flutter#168586 (comment).
- Addresses the "theme normalization" sub-project within
flutter#91772.
## 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.
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
---------
Signed-off-by: huycozy <[email protected]>
Co-authored-by: Qun Cheng <[email protected]>
…r#9472) flutter/flutter@c7362b4...0ab008a 2025-06-22 [email protected] Roll Skia from 203469ef4672 to fcd1c55da9cc (1 revision) (flutter/flutter#170986) 2025-06-22 [email protected] Roll Dart SDK from e5db5e0f81ba to 98db1db5ff65 (2 revisions) (flutter/flutter#170979) 2025-06-21 [email protected] Normalize input decoration theme (flutter/flutter#168981) 2025-06-21 [email protected] Roll Skia from dceb857b1c47 to 203469ef4672 (1 revision) (flutter/flutter#170959) 2025-06-21 [email protected] Roll Dart SDK from 6325aeacaef4 to e5db5e0f81ba (1 revision) (flutter/flutter#170958) 2025-06-21 [email protected] Roll Dart SDK from a6a3d65e33d7 to 6325aeacaef4 (2 revisions) (flutter/flutter#170955) 2025-06-21 [email protected] Roll Skia from 773188560221 to dceb857b1c47 (1 revision) (flutter/flutter#170954) 2025-06-21 [email protected] Roll Dart SDK from 750eaa028445 to a6a3d65e33d7 (1 revision) (flutter/flutter#170953) 2025-06-21 [email protected] Fix the Japanese IME problem on macOS reported in the following issue. (flutter/flutter#166291) 2025-06-21 [email protected] Roll Fuchsia Test Scripts from IfPORaYjQ2zP4bcq-... to 2wEtX_lDNhHhDNsP6... (flutter/flutter#170946) 2025-06-20 [email protected] Roll Skia from 104460420c48 to 773188560221 (2 revisions) (flutter/flutter#170942) 2025-06-20 [email protected] Normalize AppBarTheme (flutter/flutter#169130) 2025-06-20 [email protected] Close CupertinoContextMenu overlay if the widget is disposed or a new route is pushed (flutter/flutter#170186) 2025-06-20 [email protected] Roll Dart SDK from a554bdd0a2cc to 750eaa028445 (1 revision) (flutter/flutter#170933) 2025-06-20 [email protected] Roll Skia from b638003de37e to 104460420c48 (1 revision) (flutter/flutter#170932) 2025-06-20 [email protected] Roll Packages from 0ec4053 to 7f41e75 (1 revision) (flutter/flutter#170925) 2025-06-20 [email protected] Roll Skia from f1e68950ea7b to b638003de37e (5 revisions) (flutter/flutter#170923) 2025-06-20 [email protected] [licenses_cpp] jun17 (flutter/flutter#170845) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR is to make
AppBarThemeconform to Flutter Material's conventions for component themes:AppBarThemeDataclass which defines overrides for the defaults forAppBarproperties.AppBarThemeData? dataandWidget? child. This is now the preferred way to configure aAppBarTheme:These two properties are made nullable to not break existing apps which has customized
ThemeData.appBarTheme.AppBarThemeto be anInheritedWidgetsubclass.AppBarThemetoAppBarThemeData.AppBarThemeDataand update the existingAppBarThemetests.AppBarThemeDatatoObject?inThemeDataclass, to bypass g3 tests, following Normalize BottomAppBarTheme #168586 (comment).Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.