sendChatState method

Future<void> sendChatState(
  1. ChatState state,
  2. String to,
  3. {String messageType = 'chat'}
)

Send a chat state notification to to. You can specify the type attribute of the message with messageType.

Implementation

Future<void> sendChatState(
  ChatState state,
  String to, {
  String messageType = 'chat',
}) async {
  await getAttributes().sendStanza(
    StanzaDetails(
      Stanza.message(
        to: to,
        type: messageType,
        children: [
          state.toXML(),
        ],
      ),
      awaitable: false,
    ),
  );
}