-
Notifications
You must be signed in to change notification settings - Fork 29.7k
use primaryTextTheme instead of textTheme to ensure contrast to AppBar in search #28165
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
|
Thanks for the contribution! This PR introduces visual changes, so before and after screenshots should be included. If possible, it's helpful to crop full-screen screenshots to highlight the changes. A test will also be needed. Unfortunately this change will "break" existing apps that depend on the current implementation's configuration of the search text field. It would be safer to add textStyle and hintStyle parameters. |
|
Thanks for your feedback. I will upload screenshots as soon as possible. @HansMuller Would you add the parameters to the showSearch function or to the SearchDelegate ? |
|
Actually, maybe a better way to address this issue would be for your app to override |
|
Yes but it isn't really easy to override the textSytles. Moreover I think flutter should use the correct Material design. The AppBar uses the primaryTextTheme and I think the TextField should also. Right now I see no possibility to change hintStyle. I added screenshots to the first comment. |
|
I made some changes to the PR. I reverted the TextFiedl style change and the hint style change. Instead I asigned the default hintStyle from the Theme to the hinstyle. Now you can edit the hintStyle, and the changes are backwards compatible. |
|
Merge this already (or #30388). |
|
Want this |
|
Why is this still not merged? |
|
I'm hoping to get #30388 merged soon if everyone can agree in the discussion over there. The solution is the same as this PR, but it includes a test, so I think it's the closest to being merged. Track the status over there in the meantime, and I'll close this if that one is merged. |
|
@justinmc Dude merge it already. |
|
Yeah sorry about that, I definitely try to give credit to whoever comes up with a solution first, but it's hard to keep track of all of the PRs and issues. This PR is definitely contributing to the sense of urgency of this problem and the validity of the solution, even if it doesn't get merged. If you open a PR in the future feel free to tag me directly. |
|
Closing this as #30388 was just merged and built successfully. The solution that went in is the same as proposed in this PR, so SearchDelegate will now respect the Thank you again @The-Redhat for starting this whole discussion. I will try to find someone familiar with quick_actions to take a look at that PR :) |
|
Thank you very much @justinmc ! |
Description
Because the TextField is shown in the AppBar we should use the primaryTextTheme to ensure the contrast between them. In addition hintText should also has this TextStyle.
before
after
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?