sendInteractiveReplayButtons method
Implementation
Future<Request> sendInteractiveReplayButtons(
String phoneNumber,
Map<String, dynamic> headerInteractive,
String bodyText,
String footerText,
List<Map<String, dynamic>> interactiveReplyButtons) async {
final Map<String, String> headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer $accessToken',
};
final Map<String, dynamic> body = {
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": phoneNumber,
"type": "interactive",
"interactive": {
"type": "button",
"header": headerInteractive,
"body": {"text": bodyText},
"footer": {"text": footerText},
"action": {"buttons": interactiveReplyButtons}
}
};
await request.post('$fromNumberId/messages', headers, body);
return request;
}