scroll method

dynamic scroll()

Implementation

scroll() {
  if (autoScrollController.position.maxScrollExtent ==
      autoScrollController.position.pixels) {
    if (hasMore) {
      var convoParam = {
        "groupId": groupId,
        "userId": AppStorages.myUserId,
        "startAt": conversationList[conversationList.length - 1].time! - 1,
        "secretKey": AppStorages.secKey,
      };
      socket.emit('get-chat', convoParam);
    }
  } else {
    if (autoScrollController.position.pixels == 0) {
      debugPrint("TOP");
    }
  }
}