Hi Ahmed,
Thank for sharing the repo, very useful at all! :)
Only a small improvement, I've download the repo in order to run a test and saw that when the user delete a character from the text inserted previously on the TextField _searchText the listview does not update correctly.
E.g: if you type " we " you will get two outputs on listview (that is correct) but if you delete the a and leave only the "w" should appear 4 items (updating again the listview).
Perhaps this is not happening because the filteredNames inside the _buildList add the values on the tempList depending on the values of filteredNames List not the names List.
I've made a small change here for this one, on Widget _buildList()
Instead of applying the loop in order to fill the tempList from the filteredNames, I've apply the loop directly on the names list and get the output when the user delete a character from the previous inserted string.
for (int i = 0; i < filteredNames.length; i++) {
if (filteredNames[i]['name'].toLowerCase().contains(_searchText.toLowerCase())) {
tempList.add(filteredNames[i]);
}
changed to :
for (int i = 0; i < names.length; i++) {
if (names[i]['name'].toLowerCase().contains(_searchText.toLowerCase())) {
tempList.add(names[i]);
}