ready method

void ready()

Implementation

void ready() {
  cancelNotification();
  // debugPrint("isBlocked===> ${profile.isBlocked}");
  // debugPrint("profile detail===> ${profile.toJson().toString()}");
  getUnsentMessageOfAJid();
  isBlocked(profile.isBlocked);
  controller = AnimationController(
    vsync: this,
    duration: const Duration(milliseconds: 600),
  );
  /*Member(jid: profile.jid.checkNull())
      .getProfileDetails()
      .then((value) => profileDetail = value);*/
  memberOfGroup();
  setChatStatus();
  // isLive = true;
  focusNode.addListener(() {
    if (focusNode.hasFocus) {
      showEmoji(false);
    }
  });

  itemPositionsListener.itemPositions.addListener(() {
    // debugPrint('scrolled : ${findTopFirstVisibleItemPosition()}');
    // j=findLastVisibleItemPosition();
  });
  newitemPositionsListener.itemPositions.addListener(() {
    var pos = findLastVisibleItemPositionForChat();
    if (pos >= 1) {
      showHideRedirectToLatest(true);
    } else {
      showHideRedirectToLatest(false);
      unreadCount(0);
    }
  });

  SessionManagement.setCurrentChatJID(profile.jid.checkNull());
  _loadMessages();
  // compute(getChatHistory, profile.jid);
  // debugPrint("==================");
  // debugPrint(profile.image);
  setOnGoingUserAvail();
}