getChats method
get all Chats using getChats
Implementation
Future getChats({
bool onlyUser = false,
bool onlyGroups = false,
}) async {
return await wpClient.evaluateJs(
'''WPP.chat.list({
onlyUsers: ${onlyUser.jsParse},
onlyGroups: ${onlyGroups.jsParse}
});''',
methodName: "GetChats",
forceJsonParseResult: true,
);
}