Skip to content

Added opacity to cupertino switch when disabled#29451

Merged
xster merged 11 commits intoflutter:masterfrom
Robiquet:add_cupertino_switch_opacity
Apr 16, 2019
Merged

Added opacity to cupertino switch when disabled#29451
xster merged 11 commits intoflutter:masterfrom
Robiquet:add_cupertino_switch_opacity

Conversation

@Robiquet
Copy link
Contributor

@Robiquet Robiquet commented Mar 15, 2019

Description

Wrapped the widget in an opacity, if onChange is null the opacity is 0.4 otherwise it is 1.0

Related Issues

#29164

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.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@xster
Copy link
Member

xster commented Mar 15, 2019

Seems like there are 2 users involved in this. Make sure your GitHub account's email and your .gitconfig's [user] is the same user.

@xster xster added the f: cupertino flutter/packages/flutter/cupertino repository label Mar 15, 2019
@Robiquet
Copy link
Contributor Author

Robiquet commented Mar 15, 2019

@xster Am I right in thinking I can view that by running this:
git config --list ?
I can't any see emails after running that command so I'm guessing I need to add it by doing something like this:
git config --global user.email "[email protected]"
After doing that will I need to raise a new PR?

@DanTup
Copy link
Contributor

DanTup commented Mar 16, 2019

The author field on the commit seems to end with "MacBook-Pro.local". I guess it made that up based on your username/machine name because you hadn't configured any. The command you gave above will fix this for future commits, but you'll need to fix this commit, which I think you can do with:

git commit --amend --author="Author Name <[email protected]>"

Then you'd have to force push (be careful doing this, if done in the wrong place or from the wrong branch, you could lose work).

@Robiquet Robiquet force-pushed the add_cupertino_switch_opacity branch from 0873e96 to 9c2b9ad Compare March 16, 2019 13:24
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@Robiquet
Copy link
Contributor Author

Robiquet commented Mar 16, 2019

These tests were passing before I changed the author on the commit, is it because the build went down? If so how do I get the tests to run again?

@DanTup
Copy link
Contributor

DanTup commented Mar 18, 2019

The failed tests looked like infrastructure issues (io errors/failed to launch instances) so I've restarted them.

@Robiquet
Copy link
Contributor Author

@DanTup Thanks, for future reference how did you do that?

@DanTup
Copy link
Contributor

DanTup commented Mar 18, 2019

@Robiquet it requires committer access to this repo (there is a re-run button on the Cirrus pages). Another way to do it would be to just push an empty commit commit (for ex. git commit --allow-empty -m "Force build" && git push).

Copy link
Member

@xster xster left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test. This looks good to me. I just left some minor comments.

@xster
Copy link
Member

xster commented Mar 26, 2019

I think you resolved the comments but forgot to push your newest commits :)

Copy link
Member

@xster xster left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few more comments.

Tests for 'Switch turns translucent after becoming disabled' and 'Switch turns opaque after becoming enabled.' Also some small modifications to docs
@xster xster merged commit 4ef0292 into flutter:master Apr 16, 2019
@Robiquet Robiquet deleted the add_cupertino_switch_opacity branch April 16, 2019 08:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: cupertino flutter/packages/flutter/cupertino repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants