sendWhatsApp method

Future<int> sendWhatsApp({
  1. required String toNumber,
  2. required String messageBody,
})

sendWhatsApp toNumber : The number to which whatsapp message has to be sent. messageBody : The content of the message to be sent.

Method called to send whatsapp messages to the specified phone number with given content.

Returns 201 -> message sent successfully.

For more status codes refer

Implementation

Future<int> sendWhatsApp(
    {required String toNumber, required String messageBody}) async {
  return await _whatsAppService.sendWhatsAppMessage(
      toNumber: toNumber,
      messageBody: messageBody,
      twilioCreds: _twilioCreds);
}