removeGroupItem method

dynamic removeGroupItem()

Implementation

removeGroupItem() {
  if (recentChats.isNotEmpty && groupList.isNotEmpty) {
    for (var element in recentChats) {
      var groupIndex = groupList.indexWhere((it) => it.jid == element.jid);
      if (!groupIndex.isNegative) {
        _groupList.removeAt(groupIndex);
        _groupList.refresh();
      }
    }
  }
}