Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 39 commits into from

Conversation

kevaljuthani
Copy link

@kevaljuthani kevaljuthani commented Jun 8, 2020

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

InputDecorationTheme change in Search Delegate to properly override appBarTheme in Search
@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jun 8, 2020
@HansMuller HansMuller requested a review from darrenaustin June 12, 2020 20:11
Copy link
Contributor

@darrenaustin darrenaustin left a 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.

@kevaljuthani
Copy link
Author

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.

Hello @darrenaustin , I have made the requested changes.

@Piinks Piinks added the a: quality A truly polished experience label Jul 6, 2020
Copy link
Contributor

@darrenaustin darrenaustin left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: quality A truly polished experience 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.

unable to override theme of SearchDelegate
5 participants