-
Notifications
You must be signed in to change notification settings - Fork 29k
Make component theme data defaults use WidgetStateProperty
#173893
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
base: master
Are you sure you want to change the base?
Make component theme data defaults use WidgetStateProperty
#173893
Conversation
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.
Code Review
This pull request correctly replaces many instances of the deprecated MaterialStateProperty
with WidgetStateProperty
. However, the refactoring appears to be incomplete. Numerous instances of MaterialStatePropertyAll
remain, which should be replaced with WidgetStatePropertyAll
to fully address the deprecation. While I cannot comment on specific lines because they are not part of the diff, a global search for MaterialStatePropertyAll
should reveal the remaining instances that need to be updated. Completing this will make the refactoring whole.
6b4d647
to
a8ac0d3
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.
Thank you for cleaning this up! LGTM but I just want to double check with @MitchellGoodwin that we didn't defer this migration for a reason.
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! These properties were not migrated over immediately because we were watching community reactions to the WidgetStateProperty migration in general, and didn't want to add confusion. I think it's perfectly fine to migrate these over now, and thank you for doing so.
a8ac0d3
to
36b062f
Compare
Coming from the comments in #173160 (comment)
MaterialStateProperty
is deprecated. This PR remplaces its usage withWidgetStateProperty
for the files that generates component theme data defaultsPre-launch Checklist
///
).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. 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.