WppChat class
Methods
archive ({required String phone , bool archive = true })
→ Future <void >
Pass phone with correct format in archive , and
archive = true to archive , and false to unarchive
canMute ({required String phone })
→ Future <bool >
to check if we canMute phone number
clear ({required String phone , bool keepStarred = false })
→ Future
clear chat
delete ({required String phone })
→ Future
delete chat
deleteMessages ({required String phone , required List <String > messageIds })
→ Future
Delete messages
downloadMedia ({required String mediaMessageId })
→ Future
Download the blob of a media message
getChats ({bool ? onlyUser , bool ? onlyGroups })
→ Future
get all Chats using getChats
getLastSeen ({required String phone })
→ Future <int ? >
Get timestamp of last seen using getLastSeen
return either a timestamp or 0 if last seen off
getMessages ({required String phone , int count = -1 })
→ Future
Fetch messages from a chat
isValidContact ({required String phone })
→ Future <bool >
check if the given Phone number is a valid phone number
markAsSeen ({required String phone })
→ Future
Mark a chat as read and send SEEN event
markAsUnread ({required String phone })
→ Future
Mark a chat as unread
mute ({required String phone , required int expirationUnixTimeStamp })
→ Future
Mute a chat, you can use expiration and use unix timestamp (seconds only)
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pin ({required String phone , bool pin = true })
→ Future
pin/unpin to chat
rejectCall ({String ? callId })
→ Future
rejectCall will reject incoming call
sendContactCard ({required String phone , required String contactPhone , required String contactName })
→ Future
sendCreatePollMessage ({required String phone , required String pollName , required List <String > pollOptions })
→ Future
Send a create poll message , Note: This only works for groups
sendFileMessage ({required String phone , required WhatsappFileType fileType , required List <int > fileBytes , String ? caption , String ? mimetype , MessageId ? replyMessageId , String ? templateTitle , bool useTemplate = false , List <MessageButtons > ? buttons })
→ Future
send file messages using sendFileMessage
make sure to send fileType , we can also pass optional mimeType
replyMessageId
will send a quote message to the given messageId
add caption
to attach a text with the file
sendLocationMessage ({required String phone , required String lat , required String long , String ? name , String ? address , String ? url })
→ Future
send a locationMessage using sendLocationMessage
sendTextMessage ({required String phone , required String message , String ? templateTitle , bool useTemplate = false , List <MessageButtons > ? buttons , MessageId ? replyMessageId })
→ Future
sendMessage
may throw errors if passed an invalid contact
or if this method completed without any issue , then probably message sent successfully
add replyMessageId
to quote message
toString ()
→ String
A string representation of this object.
inherited
unmute ({required String phone })
→ Future
Un mute chat
whatsapp_bot_flutter 1.0.0