getJoinedGroups method Null safety
Gets all groups of the current user from the cache.
Return The group list.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<List<EMGroup>> getJoinedGroups() async {
Map result = await _channel.invokeMethod(ChatMethodKeys.getJoinedGroups);
EMError.hasErrorFromResult(result);
List<EMGroup> list = [];
result[ChatMethodKeys.getJoinedGroups]
?.forEach((element) => list.add(EMGroup.fromJson(element)));
return list;
}