-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Implemented custom border color for Checkbox and CheckboxListTile. #17957
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
Conversation
With this commit, one can change the border color a Checkbox or
CheckboxListTitle.
For example,
new Checkbox(
value: rememberMe,
activeColor: Colors.blue,
borderColor: Colors.green,
onChanged: (bool value) {
setState(() {
rememberMe = value;
});
});
or
new CheckboxListTile(
title: const Text(
'Remember me',
style: const TextStyle(color: Colors.white),
),
value: rememberMe,
activeColor: Colors.green,
borderColor: Colors.blue,
onChanged: (bool value) {
setState(() {
rememberMe = value;
});
});
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
I signed it! |
|
CLAs look good, thanks! |
|
We've talked about this in the past and I think what we should actually do is change the checkboxes to use Decorations for their various states instead (and define lerps to go between the various states). That way you can make them do whatever you want. That would be better than adding one thing at a time that you can adjust, which just won't scale. |
|
@maxchehab I'm going to close this PR for the reason described above, but if you are interested in working on the Decoration solution please don't hesitate to reach out to me, I'd be happy to guide you. |
0c35a34 Roll src/third_party/skia f5132a05c893..4baa7326ccfb (1 commits) (flutter#18003) f07712b Roll src/third_party/skia 5f56cb1d3b4f..f5132a05c893 (6 commits) (flutter#17999) 103c9c7 Bumped up the timeout for testAccessibilityFocusOnTextSemanticsProducesCorrectIosViews (flutter#17988) a1fdff6 Roll src/third_party/skia 81ef385c1fcd..5f56cb1d3b4f (14 commits) (flutter#17991) 22479ca Roll Dart to 726d3c772554924f62db0b9e0d4c280dbbddc824 (flutter#17993) 494a63c Trial PR to enable null safety unfork in the Dart SDK. (flutter#17818) 887efcb Roll fuchsia/sdk/core/linux-amd64 from eapIV... to 3h-X9... (flutter#17987) 50ae2b9 Set SkSL asset manager in RunConfiguration ctor (flutter#17948) 5f437fb Started ignoring remote keyboard notifications. (flutter#17981) 027eff8 Reenable flutter scenic test to identify crashes and follow up on fixes. (flutter#17979) 992a55c Update buildroot (flutter#17978) d5587df Roll src/third_party/skia 78debd6f6d83..81ef385c1fcd (1 commits) (flutter#17976) aa00d50 [web] Don't allow empty initial route (flutter#17936) 3b0e415 Roll fuchsia/sdk/core/mac-amd64 from 9O3Ef... to arZdZ... (flutter#17975) 66af9ea Roll src/third_party/skia 981d590e8eba..78debd6f6d83 (5 commits) (flutter#17972) 732bf22 Manual roll of Dart to 03429b20cd67f85d65cc589b529ab8c1a4780912...a53d336b9fd4bbb415d2f1e3f4c653aa107f31c7 (flutter#17971) cad81c7 Roll src/third_party/skia 1ae3e75a0b4c..981d590e8eba (1 commits) (flutter#17968) eed05dd Add initial unit tests for the android embedding (flutter#17921) 168a65f Roll src/third_party/dart 2e438d1baffc..a53d336b9fd4 (4 commits) (flutter#17967) 742adb8 Roll src/third_party/skia 97cfb05aabe4..1ae3e75a0b4c (2 commits) (flutter#17966) 805ef7c Roll fuchsia/sdk/core/mac-amd64 from 2CE6x... to 9O3Ef... (flutter#17963) 11c6a18 Roll src/third_party/skia c12aad9485a9..97cfb05aabe4 (3 commits) (flutter#17957) 4e29e57 Roll fuchsia/sdk/core/mac-amd64 from 9-v-E... to 2CE6x... (flutter#17955) 4f3b929 Roll src/third_party/dart 216e3df4526c..2e438d1baffc (7 commits) (flutter#17950) 4f888d6 Change the repo fetch script used in integration tests (flutter#17943) 3999ef9 Roll src/third_party/skia 1e21d14f2b8b..c12aad9485a9 (20 commits) (flutter#17942) d01de3b Roll src/third_party/dart a69cb6d700f5..216e3df4526c (16 commits) (flutter#17945) 2589d07 Fix accessibility focus loss when first focusing on text field (flutter#17803) 3af2b1a Roll fuchsia/sdk/core/linux-amd64 from _dAFU... to G4HpJ... (flutter#17938) d132ac5 [web] Fix exception when getting boxes for rich text range (flutter#17933) cade0e9 [web] Batch systemFontChange messages (flutter#17885)
0c35a34 Roll src/third_party/skia f5132a05c893..4baa7326ccfb (1 commits) (#18003) f07712b Roll src/third_party/skia 5f56cb1d3b4f..f5132a05c893 (6 commits) (#17999) 103c9c7 Bumped up the timeout for testAccessibilityFocusOnTextSemanticsProducesCorrectIosViews (#17988) a1fdff6 Roll src/third_party/skia 81ef385c1fcd..5f56cb1d3b4f (14 commits) (#17991) 22479ca Roll Dart to 726d3c772554924f62db0b9e0d4c280dbbddc824 (#17993) 494a63c Trial PR to enable null safety unfork in the Dart SDK. (#17818) 887efcb Roll fuchsia/sdk/core/linux-amd64 from eapIV... to 3h-X9... (#17987) 50ae2b9 Set SkSL asset manager in RunConfiguration ctor (#17948) 5f437fb Started ignoring remote keyboard notifications. (#17981) 027eff8 Reenable flutter scenic test to identify crashes and follow up on fixes. (#17979) 992a55c Update buildroot (#17978) d5587df Roll src/third_party/skia 78debd6f6d83..81ef385c1fcd (1 commits) (#17976) aa00d50 [web] Don't allow empty initial route (#17936) 3b0e415 Roll fuchsia/sdk/core/mac-amd64 from 9O3Ef... to arZdZ... (#17975) 66af9ea Roll src/third_party/skia 981d590e8eba..78debd6f6d83 (5 commits) (#17972) 732bf22 Manual roll of Dart to 03429b20cd67f85d65cc589b529ab8c1a4780912...a53d336b9fd4bbb415d2f1e3f4c653aa107f31c7 (#17971) cad81c7 Roll src/third_party/skia 1ae3e75a0b4c..981d590e8eba (1 commits) (#17968) eed05dd Add initial unit tests for the android embedding (#17921) 168a65f Roll src/third_party/dart 2e438d1baffc..a53d336b9fd4 (4 commits) (#17967) 742adb8 Roll src/third_party/skia 97cfb05aabe4..1ae3e75a0b4c (2 commits) (#17966) 805ef7c Roll fuchsia/sdk/core/mac-amd64 from 2CE6x... to 9O3Ef... (#17963) 11c6a18 Roll src/third_party/skia c12aad9485a9..97cfb05aabe4 (3 commits) (#17957) 4e29e57 Roll fuchsia/sdk/core/mac-amd64 from 9-v-E... to 2CE6x... (#17955) 4f3b929 Roll src/third_party/dart 216e3df4526c..2e438d1baffc (7 commits) (#17950) 4f888d6 Change the repo fetch script used in integration tests (#17943) 3999ef9 Roll src/third_party/skia 1e21d14f2b8b..c12aad9485a9 (20 commits) (#17942) d01de3b Roll src/third_party/dart a69cb6d700f5..216e3df4526c (16 commits) (#17945) 2589d07 Fix accessibility focus loss when first focusing on text field (#17803) 3af2b1a Roll fuchsia/sdk/core/linux-amd64 from _dAFU... to G4HpJ... (#17938) d132ac5 [web] Fix exception when getting boxes for rich text range (#17933) cade0e9 [web] Batch systemFontChange messages (#17885)
With this commit, one can change the border color of a Material Checkbox or a CheckboxListTitle.
For example,
or