-
Notifications
You must be signed in to change notification settings - Fork 28.7k
appBarTheme Override in Search Delegate #58970
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
InputDecorationTheme change in Search Delegate to properly override appBarTheme in Search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took me a while to get to. Again it looks good, but you have reformatted a bunch of the search_test.dart that changes code not relevant to your PR. Please undo any formatting changes in this file so we can see just the changes needed.
It might be easier if you revert that file and just manually copy your changes back in. And if you have an auto-format-on-save feature in your IDE you might want to turn it off. Before committing take a look at the diff and make sure it is just your changes and not any extraneous formatting changes.
Thanks again for your contribution.
As per the changes requested
Hello @darrenaustin , I have made the requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevaljuthani, thanks for the contribution. The fix looks good, but it is superseded by #55209 which wraps the whole delegate in a Theme so that the individual properties for the InputDecoration don't need to be manually set from the surrounding theme. So I will close this PR in favor of #55209, but please take a look at it and let me know if you don't think it will solve the same problem that you are trying to solve here. Thx!
InputDecorationTheme change in Search Delegate to properly override appBarTheme in Search.
Description
If you have InputDecorationTheme defined in your ThemeData and if it has borders then it would show the same in Search TextField when using Search Delegate. This commit solves the issue as we override the theme in SearchDelegate function.
Related Issues
Resolves #45498
Tests
I added the following tests:
Added the test in search_test.dart
'focused border overridden'
'enabledborder overridden'
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.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.