-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add button icon support for animation duration #162667
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
Add button icon support for animation duration #162667
Conversation
322fc87 to
29f9b78
Compare
29f9b78 to
327b200
Compare
327b200 to
575d86e
Compare
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.
Nice fix! LGTM. Thanks! Curious whether this will cause any g3fix🫣
| } | ||
|
|
||
| await tester.pumpWidget(buildFrame(appIconColor: Colors.lime)); | ||
| await tester.pumpAndSettle(); |
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.
Is this change because of the newly added AnimatedTheme in ButtonStyleButton?
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.
Yes, Themes requires tester.pumpAndSettle to rebuild the widget with updated theme.
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.
In my experience, when testing widget parameter and theme parameter in the same tests always requires tester.pumpAndSettle. These tests are doing the same.
|
Indeed this has broken Google tests. |
|
@QuncCccccc |
|
Ah missed this one. Yes! I'll take a look! |
|
@QuncCccccc How's the Google testing investigation going? (from triage) |
|
Taking a look. |
|
Added g3fix: cl/747671472 |
Fixes [Default foreground color animation duration doesn't apply on icon of `Button` widgets](flutter#162301) Fixes [Implement similar widget to``AnimatedDefaultTextStyle`` but for child ``Icon``](flutter#137251) ### Description This PR adds``AnimatedTheme` to `ButtonStyleButton` which is extended by buttons. It animates the button icon when changing icon color and size, similar to button text. ### Code Sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return const MaterialApp( home: HomePage(), ); } } class HomePage extends StatelessWidget { const HomePage({super.key}); @OverRide Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, spacing: 20, children: <Widget>[ ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ), ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( animationDuration: Duration(seconds: 2), iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ) ], ), ), ); } } ``` </details> ### Before https://github.com/user-attachments/assets/86fcab94-1147-4c49-b362-12f804a5d540 ### After https://github.com/user-attachments/assets/12a49de8-06d6-46c5-976f-5ce182d60423 ## 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. - [ ] 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 Co-authored-by: Qun Cheng <[email protected]>
flutter/flutter@db68c95...aef4718 2025-04-16 [email protected] [Web] Remove `webOnlyUniformRadii` from `RRect` (flutter/flutter#167237) 2025-04-16 [email protected] Roll Skia from 76cb5d4fba27 to 6627deb65939 (10 revisions) (flutter/flutter#167249) 2025-04-16 [email protected] Adding macrobenchmarks for DDC (flutter/flutter#166617) 2025-04-15 [email protected] Add button icon support for animation duration (flutter/flutter#162667) 2025-04-15 [email protected] Roll Dartdoc to 8.3.3 (flutter/flutter#167231) 2025-04-15 [email protected] Removed superfluous copy in license checker (flutter/flutter#167146) 2025-04-15 [email protected] license checker: ignore git sha in dart license (flutter/flutter#167153) 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],[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
|
Thank you so much for helping out! @QuncCccccc |
Fixes [Default foreground color animation duration doesn't apply on icon of `Button` widgets](flutter#162301) Fixes [Implement similar widget to``AnimatedDefaultTextStyle`` but for child ``Icon``](flutter#137251) ### Description This PR adds``AnimatedTheme` to `ButtonStyleButton` which is extended by buttons. It animates the button icon when changing icon color and size, similar to button text. ### Code Sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return const MaterialApp( home: HomePage(), ); } } class HomePage extends StatelessWidget { const HomePage({super.key}); @OverRide Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, spacing: 20, children: <Widget>[ ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ), ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( animationDuration: Duration(seconds: 2), iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ) ], ), ), ); } } ``` </details> ### Before https://github.com/user-attachments/assets/86fcab94-1147-4c49-b362-12f804a5d540 ### After https://github.com/user-attachments/assets/12a49de8-06d6-46c5-976f-5ce182d60423 ## 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. - [ ] 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 Co-authored-by: Qun Cheng <[email protected]>
flutter/flutter@db68c95...aef4718 2025-04-16 [email protected] [Web] Remove `webOnlyUniformRadii` from `RRect` (flutter/flutter#167237) 2025-04-16 [email protected] Roll Skia from 76cb5d4fba27 to 6627deb65939 (10 revisions) (flutter/flutter#167249) 2025-04-16 [email protected] Adding macrobenchmarks for DDC (flutter/flutter#166617) 2025-04-15 [email protected] Add button icon support for animation duration (flutter/flutter#162667) 2025-04-15 [email protected] Roll Dartdoc to 8.3.3 (flutter/flutter#167231) 2025-04-15 [email protected] Removed superfluous copy in license checker (flutter/flutter#167146) 2025-04-15 [email protected] license checker: ignore git sha in dart license (flutter/flutter#167153) 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],[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
…#9098) flutter/flutter@db68c95...aef4718 2025-04-16 [email protected] [Web] Remove `webOnlyUniformRadii` from `RRect` (flutter/flutter#167237) 2025-04-16 [email protected] Roll Skia from 76cb5d4fba27 to 6627deb65939 (10 revisions) (flutter/flutter#167249) 2025-04-16 [email protected] Adding macrobenchmarks for DDC (flutter/flutter#166617) 2025-04-15 [email protected] Add button icon support for animation duration (flutter/flutter#162667) 2025-04-15 [email protected] Roll Dartdoc to 8.3.3 (flutter/flutter#167231) 2025-04-15 [email protected] Removed superfluous copy in license checker (flutter/flutter#167146) 2025-04-15 [email protected] license checker: ignore git sha in dart license (flutter/flutter#167153) 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],[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
…#9098) flutter/flutter@db68c95...aef4718 2025-04-16 [email protected] [Web] Remove `webOnlyUniformRadii` from `RRect` (flutter/flutter#167237) 2025-04-16 [email protected] Roll Skia from 76cb5d4fba27 to 6627deb65939 (10 revisions) (flutter/flutter#167249) 2025-04-16 [email protected] Adding macrobenchmarks for DDC (flutter/flutter#166617) 2025-04-15 [email protected] Add button icon support for animation duration (flutter/flutter#162667) 2025-04-15 [email protected] Roll Dartdoc to 8.3.3 (flutter/flutter#167231) 2025-04-15 [email protected] Removed superfluous copy in license checker (flutter/flutter#167146) 2025-04-15 [email protected] license checker: ignore git sha in dart license (flutter/flutter#167153) 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],[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
…#9098) flutter/flutter@db68c95...aef4718 2025-04-16 [email protected] [Web] Remove `webOnlyUniformRadii` from `RRect` (flutter/flutter#167237) 2025-04-16 [email protected] Roll Skia from 76cb5d4fba27 to 6627deb65939 (10 revisions) (flutter/flutter#167249) 2025-04-16 [email protected] Adding macrobenchmarks for DDC (flutter/flutter#166617) 2025-04-15 [email protected] Add button icon support for animation duration (flutter/flutter#162667) 2025-04-15 [email protected] Roll Dartdoc to 8.3.3 (flutter/flutter#167231) 2025-04-15 [email protected] Removed superfluous copy in license checker (flutter/flutter#167146) 2025-04-15 [email protected] license checker: ignore git sha in dart license (flutter/flutter#167153) 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],[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
Fixes [Default foreground color animation duration doesn't apply on icon of `Button` widgets](flutter#162301) Fixes [Implement similar widget to``AnimatedDefaultTextStyle`` but for child ``Icon``](flutter#137251) ### Description This PR adds``AnimatedTheme` to `ButtonStyleButton` which is extended by buttons. It animates the button icon when changing icon color and size, similar to button text. ### Code Sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return const MaterialApp( home: HomePage(), ); } } class HomePage extends StatelessWidget { const HomePage({super.key}); @OverRide Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, spacing: 20, children: <Widget>[ ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ), ElevatedButton.icon( icon: const Icon(Icons.favorite_rounded, size: 50), label: const Text('Button', style: TextStyle(fontSize: 36)), onPressed: () {}, style: const ButtonStyle( animationDuration: Duration(seconds: 2), iconColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), foregroundColor: WidgetStateProperty<Color>.fromMap( <WidgetStatesConstraint, Color>{ WidgetState.pressed: Color(0XFFFF0000), WidgetState.any: Color(0XFF000000), }, ), ), ) ], ), ), ); } } ``` </details> ### Before https://github.com/user-attachments/assets/86fcab94-1147-4c49-b362-12f804a5d540 ### After https://github.com/user-attachments/assets/12a49de8-06d6-46c5-976f-5ce182d60423 ## 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. - [ ] 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 Co-authored-by: Qun Cheng <[email protected]>
Fixes Default foreground color animation duration doesn't apply on icon of
ButtonwidgetsFixes Implement similar widget to
AnimatedDefaultTextStylebut for childIconDescription
This PR adds``AnimatedTheme
toButtonStyleButton` which is extended by buttons. It animates the button icon when changing icon color and size, similar to button text.Code Sample
expand to view the code sample
Before
before.mp4
After
after.mp4
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.