upgrade sdk

This commit is contained in:
hrxiang
2021-09-14 17:33:19 +08:00
parent d11fdfa0f7
commit c53b119e60
12 changed files with 945 additions and 12 deletions

View File

@@ -90,6 +90,24 @@ class GroupManager {
.then((value) => GroupMembersList.fromJson(_formatJson(value)));
}
// filter 0: all user, 1: group owner, 2: administrator
/// begin index, pull and fill 0 for the first time
Future<dynamic> getGroupMemberListMap({
required String groupId,
int filter = 0,
int next = 0,
}) {
return _channel
.invokeMethod(
'getGroupMemberList',
_buildParam({
'gid': groupId,
'filter': filter,
'next': next,
}))
.then((value) => _formatJson(value));
}
/// find all groups you have joined
Future<List<GroupInfo>> getJoinedGroupList() {
return _channel.invokeMethod('getJoinedGroupList', _buildParam({})).then(
@@ -98,6 +116,13 @@ class GroupManager {
.toList());
}
/// find all groups you have joined
Future<List<dynamic>> getJoinedGroupListMap() {
return _channel
.invokeMethod('getJoinedGroupList', _buildParam({}))
.then((value) => _formatJson(value));
}
/// check
Future<bool> isJoinedGroup({required String gid}) {
return getJoinedGroupList()