ArcticZeroo / flutter-search-bar

(mostly) Automatic search-enabled appBar for flutter
BSD 3-Clause "New" or "Revised" License
266 stars 68 forks source link

Real time filtering #13

Open fvisticot opened 6 years ago

fvisticot commented 6 years ago

I need to filter the listview when user tapes in the search bar. I have implemented the TextEditingController + listener

But, the listview is hidden when the searchbar is displayed.

How to display the list and filtered list when searchbar is active and users is typing text ?

ArcticZeroo commented 6 years ago

I'm not really sure what the issue is. Can you post the relevant code? Assuming I do understand you correctly though, Isn't it true that you control the ListView? Also consider using https://pub.dartlang.org/packages/material_search if you want specifically to filter a ListVIew based on user input dynamically.

SarcasticNoodle commented 6 years ago

I think he is searching for something like this: https://medium.com/@dominik2003schulze2/how-to-create-a-searchable-filterable-listview-in-flutter-4faf3e300477

ArcticZeroo commented 5 years ago

onChange is implemented here - https://github.com/ArcticZeroo/flutter-search-bar/commit/1f6507fb138d57922f7a1faf8401689b7589c4f6 , is this sufficient?

SarcasticNoodle commented 5 years ago

This works

jakesq commented 5 years ago

If you mean that the contents of the page are 'pushed up' when the on screen keyboard is displayed, try setting 'resizeToAvoidBottomPadding' to false in your Scaffold. Hope this helps