updateProfileSearch method

void updateProfileSearch(
  1. String jid
)

Implementation

void updateProfileSearch(String jid) {
  debugPrint("updateProfileSearch jid $jid");
  if (jid.isNotEmpty) {
    var userListIndex = _userList.indexWhere((element) => element.jid == jid);
    debugPrint("userListIndex $userListIndex");
    if (!userListIndex.isNegative) {
      getProfileDetails(jid).then((value) {
        debugPrint("get profile detail dashboard $value");
        profile_(value);
        var updateIndex =
            _userList.indexWhere((element) => element.jid == jid);
        _userList[updateIndex] = value;
      });
    }
  }
}