searchAction method
Implementation
void searchAction(String value) {
if (value.isNotEmpty) {
List<UserModel> results = RoomStore.to.userInfoList
.where((user) =>
user.userName.toLowerCase().contains(value.toLowerCase()))
.toList();
searchResults.assignAll(results);
isSearchBarEmpty.value = false;
} else {
searchResults.clear();
isSearchBarEmpty.value = true;
}
}