onChange method

dynamic onChange(
  1. String inputValue, [
  2. int? value
])

Implementation

onChange(String inputValue, [int? value]) {
  if (search.text.trim().isNotEmpty) {
    clearVisible(true);
  } else {
    clearVisible(false);
    recentChats.refresh();
  }
  if (lastInputValue != search.text.trim()) {
    lastInputValue = search.text.trim();
    searchLoading(true);
    // frmRecentChatList.clear();
    recentSearchList.clear();
    if (search.text.trim().isNotEmpty) {
      deBouncer.run(() {
        pageNum = 1;
        fetchRecentChatList();
        fetchMessageList();
        filterUserList();
      });
    } else {
      mirrorFlyLog("empty", "empty");
      // frmRecentChatList.addAll(recentChats);
    }
  }
  update();
}