getOnlineGroupMemberCount static method
get the total count of online users in particular groups
guids
list of group ids
method could throw PlatformException with error codes specifying the cause
Implementation
static Future<Map<String, int>?> getOnlineGroupMemberCount(List<String> guids,
{required Function(Map<String, int> result)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
final result = await channel.invokeMethod('getOnlineGroupMemberCount', {
'guids': guids,
});
final Map<String, int> res = Map<String, int>.from(result);
if (onSuccess != null) onSuccess(res);
return res;
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
return null;
}