-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SwitchListTile] adds controlAffinity property #58037
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
[SwitchListTile] adds controlAffinity property #58037
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.
LGTM
Looks like the analyzer is complaining about trailing whitespace |
Btw, I just realized you're not listed as an AUTHOR on the AUTHORS page. If you want, feel free to add yourself on there since you've been contributing a great deal in the last few months |
Thank you 😄 |
AUTHORS
Outdated
@@ -56,3 +56,4 @@ Michael Lee <ckmichael8@gmail.com> | |||
Katarina Sheremet <katarina@sheremet.ch> | |||
Nicolas Schneider <nioncode+git@gmail.com> | |||
Mikhail Zotyev <mbixjkee1392@gmail.com> | |||
Ayush Bherwani <ayush.bherwani1998@gmail.com> |
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.
nit: add a newline to the end of files
Ayush Bherwani <ayush.bherwani1998@gmail.com> | |
Ayush Bherwani <ayush.bherwani1998@gmail.com> | |
@@ -298,4 +298,44 @@ void main() { | |||
await tester.pump(); | |||
expect(Focus.of(childKey.currentContext, nullOk: true).hasPrimaryFocus, isFalse); | |||
}); | |||
|
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.
This is the trailing whitespace:
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.
But, isn't that a new line? It feels weird that analyzer is complaining about it.
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.
It's not the new line. It's the whitespace within the line.
{whitespace}{whitespace}
vs
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.
I see, thanks for clearing silly doubt @shihaohong.
I'll do the required changes.
Description
Adds
controlAffinity
property to change the position ofSwitch
.Related Issues
Fixes #22134
Tests
I added the following tests:
controlAffinity
property works as desired and position ofSwitch
is changed.controlAffinity
works as desired.Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.