chatInfo method

dynamic chatInfo(
  1. BuildContext context
)

Implementation

chatInfo(BuildContext context) {
  var chatIndex = recentChats.indexWhere((element) =>
  selectedChats.first == element.jid); //selectedChatsPosition[index];
  var item = recentChats[chatIndex];
  // Helper.progressLoading(context: context);
  clearAllChatSelection();
  // getProfileDetails(item.jid.checkNull()).then((value) {
    if (item.jid != null) {
      // Helper.hideLoading(context: context);
      // var profile = profiledata(value.toString());
      if (item.isGroup!) {
        Future.delayed(const Duration(milliseconds: 100),
                () => Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (con) =>
                        GroupInfoView(jid: item.jid.checkNull()))));//Get.toNamed(Routes.groupInfo, arguments: profile));
      } else {
        Future.delayed(const Duration(milliseconds: 100),
                () =>  Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (con) => ChatInfoView(jid: item.jid.checkNull()))));//Get.toNamed(Routes.chatInfo, arguments: profile));
      }
    }
  // });
}