clearChat function

void clearChat({
  1. dynamic groupId,
  2. dynamic userId,
  3. Function? onSuccess,
})

Implementation

void clearChat({groupId, userId, Function? onSuccess}) {
  var params = {
    "groupId": groupId,
    "userId": userId,
    "secretKey": AppStorages.secKey
  };
  socket.emit("clear-chat", params);
  socket.on("clear-chat-res", (data) {
    if (data['isSuccess']) {
      if (onSuccess != null) {
        onSuccess();
      }
    }
  });
}