这是indexloc提供的服务,不要输入任何密码
Skip to content

[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

Merged
merged 5 commits into from
May 27, 2020
Merged

[SwitchListTile] adds controlAffinity property #58037

merged 5 commits into from
May 27, 2020

Conversation

AyushBherwani1998
Copy link
Member

Description

Adds controlAffinity property to change the position of Switch.

Related Issues

Fixes #22134

Tests

I added the following tests:

  • Added test to check controlAffinity property works as desired and position of Switch is changed.
  • Added test to check the default value of 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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.
    • I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
    • I got input from the developer relations team, specifically from: Replace with the names of who gave advice
    • I wrote a migration guide: Replace with a link to your migration guide

@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels May 26, 2020
Copy link
Contributor

@shihaohong shihaohong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shihaohong
Copy link
Contributor

Looks like the analyzer is complaining about trailing whitespace

@shihaohong shihaohong self-assigned this May 26, 2020
@shihaohong
Copy link
Contributor

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

@AyushBherwani1998
Copy link
Member Author

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 😄
I have updated the AUTHORS

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>
Copy link
Contributor

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

Suggested change
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);
});

Copy link
Contributor

@shihaohong shihaohong May 27, 2020

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:

Suggested change

Copy link
Member Author

@AyushBherwani1998 AyushBherwani1998 May 27, 2020

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.

Copy link
Contributor

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


Copy link
Member Author

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.

@fluttergithubbot fluttergithubbot merged commit 8b63c65 into flutter:master May 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwitchListTile has no controlAffinity property like CheckboxListTile or RadioListTile
4 participants