Unread Count
Flutter unread count for messages
Unread counts refer to the count of unread messages.
Unread message count for conversations with user (contact)
To get the unread count for a contact, pass the userId
of the contact to the function:
ApplozicFlutter.getUnreadCountForContact(userId)
.then((value) => print("Unread count : " + value.toString()))
.catchError((e, s) => print("Error."));
Unread message count for group conversations
To get the unread count for a channel, create a object with either the groupId
or the clientGroupId
(only one required):
dynamic channelDetails = { //you can to have either one of the two
'groupId' : 123456,
'clientGroupId' : "clientGroupId"
};
Then pass the object to this function:
ApplozicFlutter.getUnreadCountForChannel(channelDetails)
.then((value) => print("Unread count : " + value.toString()))
.catchError((e, s) => print("Error."));
Number of unread conversations
Simply call the following function:
ApplozicFlutter.getUnreadChatsCount()
.then((value) => print("Unread chats count : " + value.toString()))
.catchError((e, s) => print("Error."));
Total unread message count
Simply call the following function:
ApplozicFlutter.getTotalUnreadCount()
.then((value) => print("Total unread count : " + value.toString()))
.catchError((e, s) => print("Error."));
Updated 6 months ago
Did this page help you?