Hi, if you add the language to your code snippet the code will be much easier to read. For instance:
void searchFunc() { List<model> tempList = []; if (!searchText.isEmpty) { for (int i = 0; i < Items.length; i++) { if(Items[i].name.toLowerCase().contains(searchText.toLowerCase())) { tempList.add(Items[i]); } } setState(() { found = true; filteredItem = tempList; }); } if (filteredItem.isEmpty) { setState(() { found = false; }); } }
dev.to is not Medium. It is much better. ;)
Thanks for the suggestion Buddy!!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, if you add the language to your code snippet the code will be much easier to read. For instance:
dev.to is not Medium. It is much better. ;)
Thanks for the suggestion Buddy!!