asadamatic / firestore_search

This package helps flutter developers to implement cloud_firestore search in their apps.
MIT License
12 stars 21 forks source link

Search Case #15

Open vjk10 opened 2 years ago

vjk10 commented 2 years ago

An option to change the text case from the search bar would be great.

asadamatic commented 2 years ago

Yes, might consider it in future updates. Thanks :)

ffaridi1 commented 2 years ago

Yes please make the search case in-sensitive , without this it will become impossible for user to guess the case of search term.

ffaridi1 commented 2 years ago

Actually I just thought of a very simple solution (without looking too deep into firestore search options etc) . I have defined a new field in my documents "search_tag" and make it's value all lower case and exactly same as the main search field. Now the user can type in the lower case and it can still search. One issue is now if user types any Upper case letter , search fails again. But this is easy to fix, the search field can convert the input to all lowercase before searching firestore. I will fork and have a new option added in the widget to enable all lower case search to handle my situation. Very Clean and Nice Widget !!!

asadamatic commented 2 years ago

@ffaridi1 Thanks for Your solution. I haven't worked on the package for quite some time and there's a lot of features waiting to be integrated and better search options are probably among the top required features.

ffaridi1 commented 2 years ago

is there a way to clear the searchbar upon clicking on a searched item ? I am poping the search page but when I come back to the page the previous text is still there in the searchbar. Is there a controller available to clear the content of text field?

asadamatic commented 2 years ago

Yes, there is a controller but that is hidden and cannot be used externally. I'll add a function to clear the search bar.

vjk10 commented 2 years ago

It's a simple solution by giving a parameter like search tag. Maybe I can have a fork and try helping..

asadamatic commented 2 years ago

@vjk10 I could have added it but I'm not working on the package nowadays. A fork would be highly appreciated. If you're building a production-level app, I would recommend building it from scratch.

ranahyder87 commented 2 years ago

@asadamatic I have created a fork with textCapitalization and keyboardType options focusing on input customization. If you like you can merge it. Thanks.

ranahyder87 commented 2 years ago

@all you can use my fork for input customization until Asad accepts the merge request

dependencies:
  firestore_search:
    git:
      url: https://github.com/ranahyder87/firestore_search_input.git