searchfield icon indicating copy to clipboard operation
searchfield copied to clipboard

Refactor `SearchInputDecoration` class added maintainHintHeight

Open mrjake34 opened this issue 1 year ago • 8 comments

This commit refactors the SearchInputDecoration class in input_decoration.dart. It adds a new property maintainHintHeight and updates the constructor and methods accordingly. This change improves the flexibility and customization options for the SearchInputDecoration class.

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.

Pre-launch Checklist

  • [ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [ ] I listed at least one issue that this PR fixes in the description above.
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [ ] I added new tests to check the change I am making, or this PR is [test-exempt].
  • [ ] All existing and new tests are passing using flutter test

If you need help, consider pinging the maintainer @maheshj01

mrjake34 avatar Oct 01 '24 22:10 mrjake34

Hi @mrjake34 thanks for the PR

maheshj01 avatar Oct 01 '24 23:10 maheshj01

@mrjake34 The getter 'maintainHintHeight' isn't defined for the type 'SearchInputDecoration, I believe SearchInputDecoration is inheriting all the properties of inputDecoration

maheshj01 avatar Oct 01 '24 23:10 maheshj01

I tested on Flutter version 3.26.0-1.0.pre.259, all tests done. There might be a newly added variable

mrjake34 avatar Oct 01 '24 23:10 mrjake34

Perhaps you are not on flutter stable channel? Can you share the output of flutter doctor?

maheshj01 avatar Oct 01 '24 23:10 maheshj01

The system required the 'maintainHintHeight' attribute. I was getting an error until I included it. By adding this attribute, I was able to fix the issue.

mrjake34 avatar Oct 01 '24 23:10 mrjake34

Perhaps you are not on flutter stable channel? Can you share the output of flutter doctor?

its channel master

mrjake34 avatar Oct 01 '24 23:10 mrjake34

Thanks for the info, Unfortunately I won't be able to merge this PR until that property lands on the flutter stable channel, I will leave this PR open though and when this property is available, we will merge it.

maheshj01 avatar Oct 01 '24 23:10 maheshj01

Thanks for the info, Unfortunately I won't be able to merge this PR until that property lands on the flutter stable channel, I will leave this PR open though and when this version of flutter stable is available we will merge it.

Absolutely, it can be problem, thanks for share this package to us.

mrjake34 avatar Oct 01 '24 23:10 mrjake34

@maheshj01 sir when i close the keyboard all the suggestion showing from scratch not showing hat i have entered char in the textfield https://drive.google.com/file/d/132iZYWgLzDNMllLGyOlkA15SayzkrcZe/view check this

sabari7320 avatar Nov 07 '24 10:11 sabari7320

Can we at least merge the extension of the copyWith constructor and ignore the value? This should be compatible with both Flutter SDKs >= and >3.24.x

Gustl22 avatar Nov 11 '24 16:11 Gustl22

@Gustl22 Sorry I am not sure I understood what you meant?

maheshj01 avatar Nov 22 '24 00:11 maheshj01

Thanks for the info, Unfortunately I won't be able to merge this PR until that property lands on the flutter stable channel, I will leave this PR open though and when this property is available, we will merge it.

It's on the stable channel as of 3.27.0 release.

nvi9 avatar Dec 12 '24 08:12 nvi9

Sorry I will have to close this, This fix has been Published in latest release v1.2.1 in response to #195.

Thank you everyone for your inputs.

maheshj01 avatar Dec 12 '24 19:12 maheshj01