Skip to content
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

ExpandIcon Custom Colors #33148

Merged
merged 16 commits into from May 24, 2019

Conversation

Projects
None yet
3 participants
@shihaohong
Copy link
Contributor

commented May 21, 2019

Description

  • Adds custom icon color, expanded icon color, and disabled icon colors to the ExpandIcon widget. As part of this change, ExpandIcon now uses Colors.white60 instead of Colors.white54 when dark theme is used.
  • Updates the dark mode ThemeData.disabledColor value to match the Material Design specification. See #33149
  • Fixes the Colors.white30's documented opacity value, which was incorrectly stating it was 32% opacity instead of 30%.

This takes over #31053

Related Issues

#18992
#21328

Tests

I added the following tests:

  • Tests to verify default light/dark mode ExpandIcon's color and its disabled color
  • Tests to verify ExpandIcon takes custom icon color, expanded icon color, and disabled icon color

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 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

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

Show resolved Hide resolved packages/flutter/lib/src/material/colors.dart Outdated
Show resolved Hide resolved packages/flutter/lib/src/material/colors.dart Outdated
@@ -249,7 +249,7 @@ class ThemeData extends Diagnosticable {
splashColor: splashColor,
materialTapTargetSize: materialTapTargetSize,
);
disabledColor ??= isDark ? Colors.white30 : Colors.black38;
disabledColor ??= isDark ? Colors.white50 : Colors.black38;

This comment has been minimized.

Copy link
@HansMuller

HansMuller May 22, 2019

Contributor

This change is likely to have an impact on many apps and tests. Even though it's a tiny change, it would be good to move it to a separate PR.

This comment has been minimized.

Copy link
@shihaohong

shihaohong May 22, 2019

Author Contributor

That makes sense. I'll make the color update into a separate PR

This comment has been minimized.

Copy link
@shihaohong

shihaohong May 22, 2019

Author Contributor

Tracking here: #33149

@shihaohong shihaohong changed the title ExpandIcon Custom Colors WIP ExpandIcon Custom Colors May 22, 2019

@shihaohong shihaohong merged commit 9d52085 into flutter:master May 24, 2019

35 checks passed

WIP Ready for review
Details
add2app-macos Task Summary
Details
add2app-macos
Details
analyze Task Summary
Details
analyze
Details
build_tests-linux Task Summary
Details
build_tests-linux
Details
build_tests-macos Task Summary
Details
build_tests-macos
Details
build_tests-windows Task Summary
Details
build_tests-windows
Details
cla/google All necessary CLAs are signed
deploy_gallery Task Summary
Details
deploy_gallery
Details
deploy_gallery-macos Task Summary
Details
deploy_gallery-macos
Details
docs Task Summary
Details
docs
Details
flutter-build
Details
integration_tests-linux Task Summary
Details
integration_tests-linux
Details
integration_tests-windows Task Summary
Details
integration_tests-windows
Details
tests-linux Task Summary
Details
tests-linux
Details
tests-macos Task Summary
Details
tests-macos
Details
tests-windows Task Summary
Details
tests-windows
Details
tool_tests-linux Task Summary
Details
tool_tests-linux
Details
tool_tests-macos Task Summary
Details
tool_tests-macos
Details
tool_tests-windows Task Summary
Details
tool_tests-windows
Details

@shihaohong shihaohong deleted the shihaohong:expand-icon branch May 24, 2019

Kiku-Reise added a commit to Kiku-Reise/flutter that referenced this pull request Jun 14, 2019

ExpandIcon Custom Colors (flutter#33148)
* Implement ExpandIcon custom color, expandedColor, and disabledColor

* Update to use pumpAndSettle instead of hard-coded duration

* Update colors to unfocused state, added dark mode test to active state

* Fix Colors.white30 doc opacity value

* Add links to Material Design specifications to color, expandedColor and disabledColor

* Update API docs to reference dark theme material page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.