getCount static method
dynamic
getCount(
- dynamic unreadCount(
- dynamic
Implementation
static getCount(Function(dynamic) unreadCount) {
var params = {
"secretKey": AppStorages.secKey,
"userId": AppStorages.myUserId
};
socket.connect();
socket.onDisconnect((_) {
socket.connect();
});
socket.emit('user-unread-count', params);
socket.on('user-unread-count-res-${AppStorages.myUserId}', (data) {
unreadCount(data);
});
}