# sendMessage method

Future <void> sendMessage(

1. JID to,
2. TypedMap <StanzaHandlerExtension> extensions,
3. {String type = 'chat'}

)

Send an unawaitable message to `to`. `extensions` is a typed map that contains data for building the message.

## Implementation

    Future<void> sendMessage(
      JID to,
      TypedMap<StanzaHandlerExtension> extensions, {
      String type = 'chat',
    }) async {
      await getAttributes().sendStanza(
        StanzaDetails(
          Stanza.message(
            to: to.toString(),
            id: extensions.get<MessageIdData>()?.id,
            type: type,
            children: _messageSendingCallbacks
                .map((c) => c(extensions))
                .flattened
                .toList(),
          ),
          extensions: extensions,
          awaitable: false,
        ),
      );
    }