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
Merged

ExpandIcon Custom Colors #33148

merged 16 commits into from May 24, 2019

Conversation

@shihaohong
Copy link
Contributor

@shihaohong shihaohong 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?

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

@HansMuller HansMuller May 22, 2019

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

@shihaohong shihaohong May 22, 2019

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@shihaohong shihaohong May 22, 2019

Choose a reason for hiding this comment

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

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
@shihaohong shihaohong deleted the expand-icon branch May 24, 2019
Kiku-Reise pushed a commit to Kiku-Reise/flutter that referenced this issue Jun 14, 2019
* 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
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants