-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
base: master
Are you sure you want to change the base?
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🫣
@@ -490,9 +490,11 @@ void main() { | |||
} | |||
|
|||
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! |
Fixes Default foreground color animation duration doesn't apply on icon of
Button
widgetsFixes Implement similar widget to
AnimatedDefaultTextStyle
but for childIcon
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
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.