CupertinoTextField: added ability to change placeholder color#28001
CupertinoTextField: added ability to change placeholder color#28001xster merged 3 commits intoflutter:masterfrom
Conversation
|
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
Googlers can find more info about SignCLA and this PR by following this link. |
I signed it! |
|
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. Googlers can find more info about SignCLA and this PR by following this link. |
|
I signed it |
|
CLAs look good, thanks! Googlers can find more info about SignCLA and this PR by following this link. |
|
Should I change anything to resolve this PR? |
|
@Nizarius would you mind correcting the analysis issues? |
|
@matthew-carroll yeah, of course. |
|
@Nizarius yes, I think we should allow an arbitrary Also, would you mind adding some tests for this new behavior? |
75ed614 to
10ae036
Compare
|
@matthew-carroll I updated my PR to pass all the tests. |
|
Sure. @Nizarius, adding tests does sound a bit overwhelming initially though if you take a look at https://github.com/flutter/flutter/blob/master/packages/flutter/test/cupertino/text_field_test.dart, there are already tons of examples that you can base new tests off of. Some even creates and asserts the styles of the placeholder text. I'd create a new test based off of that one to make sure custom placeholder styles are respected. |
|
@xster @matthew-carroll I fixed code according to your notes and also added test for placeholder's style. |
…e test for new functionality
|
@xster @matthew-carroll hi guys. Is there anything I need to do? |
|
|
||
| /// The style to use for the placeholder text which overrides [style] property. | ||
| /// | ||
| /// If null, placeholder's style will be the same as [style]. |
There was a problem hiding this comment.
This isn't true, is it? the placeholder should at least have a special color even if placeholderStyle isn't provided, right?
|
@Nizarius there's some trickiness with the whole TextStyle merge thing that isn't really easy to explain so we tweaked the doc in your branch a bit. Hope that's ok. The rest of the PR looks good to us. We'll merge it in when our tree is green. Thanks for the contribution. |
|
@xster @matthew-carroll thank you, guys. Hope Flutter will continue to evolve. |
|
Thanks for your contribution |
Resolves #24175
https://github.com/flutter/flutter/projects/9#card-14775899