sendToChatPage method

dynamic sendToChatPage(
  1. BuildContext context,
  2. String userJid,
  3. bool showChatDeliveryIndicator
)

Implementation

sendToChatPage(
    BuildContext context, String userJid, bool showChatDeliveryIndicator) {
  try {
    Navigator.push(
        context,
        MaterialPageRoute(
            builder: (con) => ChatView(
                  jid: userJid,
                  isUser: true,
                  showChatDeliveryIndicator: showChatDeliveryIndicator,
                )));
  } catch (e) {
    Navigator.pop(context);
    Navigator.push(
        context,
        MaterialPageRoute(
            builder: (con) => ChatView(
                  jid: userJid,
                  isUser: true,
                  showChatDeliveryIndicator: showChatDeliveryIndicator,
                )));
  }
}