sendCreatePollMessage method

Future sendCreatePollMessage({
  1. required String phone,
  2. required String pollName,
  3. required List<String> pollOptions,
})

Send a create poll message , Note: This only works for groups

Implementation

Future sendCreatePollMessage(
    {required String phone,
    required String pollName,
    required List<String> pollOptions}) async {
  return await wpClient.evaluateJs(
    '''WPP.chat.sendCreatePollMessage(${phone.phoneParse},${pollName.jsParse},${pollOptions.jsParse});''',
    methodName: "sendCreatePollMessage",
  );
}