search method
Implementation
search(String? text) {
if (text == null || text.isEmpty) {
_listToShow = originalList;
notifyListeners();
return;
}
_listToShow = originalList
.where((element) =>
element.title.toUpperCase().contains(text.toUpperCase()) ||
element.id.toUpperCase().contains(text.toUpperCase()))
.toList();
notifyListeners();
}