startSearch method
Implementation
void startSearch(String str) {
if (str.isNotEmpty) {
clear(true);
if (lastInputValue != str.trim()) {
starredChatList.clear();
lastInputValue = str.trim();
addSearchedMessagesToList(str.trim());
}
} else {
lastInputValue = Constants.emptyString;
clear(false);
starredChatList.clear();
starredChatList.addAll(searchedStarredMessageList);
starredChatList.refresh();
}
}