Skip to content

Conversation

@GayathrideviGA
Copy link

@GayathrideviGA GayathrideviGA commented Apr 13, 2023

M3 chips, it looks like the RawChip widget itself ignores the showCheckmark from the themes, because its instance value (priority) has a default = true on the constructor.

Previously, the checkmark in the ChoiceChip component was not being hidden when using Material 3.

To address this issue, we have added two new parameters to the ChoiceChip component. The first parameter, showCheckMark, allows us to hide or show the checkmark based on true/false conditions. The second parameter, checkMarkColor, provides the ability to customize the colour of the checkmark displayed.
With these changes, the ChoiceChip component now works as expected with Material 3, and provides greater flexibility and control over the display of the checkmark.

Fixes #119163

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

The checkmark in the ChoiceChip component was not hidden when using Material 3. This commit adds the necessary code to hide the check mark. Resolves flutter#124662.
@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 13, 2023
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation c: contributor-productivity Team-specific productivity, code health, technical debt. labels Apr 13, 2023
@GayathrideviGA GayathrideviGA marked this pull request as draft April 13, 2023 10:38
@GayathrideviGA GayathrideviGA marked this pull request as ready for review April 13, 2023 10:41
@GayathrideviGA GayathrideviGA marked this pull request as draft April 13, 2023 11:20
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@GayathrideviGA GayathrideviGA marked this pull request as ready for review April 13, 2023 12:07
@GayathrideviGA
Copy link
Author

GayathrideviGA commented Apr 13, 2023

@TahaTesser @huycozy @guidezpl Resolved: Need review

@9oya
Copy link
Contributor

9oya commented Apr 14, 2023

@GayathrideviGA I already added this PR which includes widget tests and related docs.

@GayathrideviGA GayathrideviGA changed the title [Material 3] Hide check mark in ChoiceChip [Material 3] Chips showCheckmark from theme being ignored Apr 14, 2023
@GayathrideviGA GayathrideviGA changed the title [Material 3] Chips showCheckmark from theme being ignored [Material 3] Chips showCheckmark from theme being ignored #119163 Apr 14, 2023
@GayathrideviGA GayathrideviGA deleted the fix124662 branch April 14, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos 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.

RawChip doesn't use ChipThemeData.showCheckmark value

2 participants