ChatGroupManager class
~english The group manager class, which manages group creation and deletion, user joining and exiting the group, etc. ~end
~chinese 群组管理类,用于管理群组的创建,删除及成员管理等操作。 ~end
Constructors
Properties
- downloadCallback ↔ ChatDownloadCallback?
-
~english
group shared file download callback.
~end
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
acceptInvitation(
String groupId, String inviter) → Future< ChatGroup> - ~english Accepts a group invitation.
-
acceptJoinApplication(
String groupId, String username) → Future< void> - ~english Approves a group request.
-
addAdmin(
String groupId, String memberId) → Future< void> - ~english Adds a group admin.
-
addAllowList(
String groupId, List< String> members) → Future<void> - ~english Adds members to the allow list of the group.
-
addEventHandler(
String identifier, ChatGroupEventHandler handler) → void - ~english Adds the group event handler. After calling this method, you can handle for new group event when they arrive.
-
addMembers(
String groupId, List< String> members, {String? welcome}) → Future<void> - ~english Adds users to the group.
-
blockGroup(
String groupId) → Future< void> - ~english Blocks group messages.
-
blockMembers(
String groupId, List< String> members) → Future<void> - ~english Adds the user to the block list of the group.
-
changeGroupDescription(
String groupId, String desc) → Future< void> - ~english Changes the group description.
-
changeGroupName(
String groupId, String name) → Future< void> - ~english Changes the group name.
-
changeOwner(
String groupId, String newOwner) → Future< void> - ~english Transfers the group ownership.
-
clearEventHandlers(
) → void - ~english Clear all group event handlers. ~end
-
createGroup(
{String? groupName, String? desc, List< String> ? inviteMembers, String? inviteReason, required ChatGroupOptions options}) → Future<ChatGroup> - ~english Creates a group instance.
-
declineInvitation(
{required String groupId, required String inviter, String? reason}) → Future< void> - ~english Declines a group invitation.
-
declineJoinApplication(
String groupId, String username, {String? reason}) → Future< void> - ~english Declines a group request.
-
destroyGroup(
String groupId) → Future< void> - ~english Destroys the group instance.
- ~english Downloads the shared file of the group.
-
fetchAllowListFromServer(
String groupId) → Future< List< String> > - ~english Gets the allow list of the group from the server.
-
fetchAnnouncementFromServer(
String groupId) → Future< String?> - ~english Gets the group announcement from the server.
-
fetchBlockListFromServer(
String groupId, {int pageSize = 200, int pageNum = 1}) → Future< List< String> > - ~english Gets the group block list from server with pagination.
-
fetchGroupFileListFromServer(
String groupId, {int pageSize = 200, int pageNum = 1}) → Future< List< ChatGroupSharedFile> > - ~english Gets the shared files of the group from the server.
-
fetchGroupInfoFromServer(
String groupId, {bool fetchMembers = false}) → Future< ChatGroup> - ~english Gets the group information from the server.
-
fetchJoinedGroupCount(
) → Future< int> - ~english Gets groups count of the current user joined from the server.
-
fetchJoinedGroupsFromServer(
{int pageSize = 20, int pageNum = 0, bool needMemberCount = false, bool needRole = false}) → Future< List< ChatGroup> > - ~english Gets all groups of the current user from the server.
-
fetchMemberAttributes(
{required String groupId, String? userId}) → Future< Map< String, String> > - ~english Gets all custom attributes of a group member.
-
fetchMemberListFromServer(
String groupId, {int pageSize = 200, String? cursor}) → Future< ChatCursorResult< String> > - ~english Gets the member list of the group with pagination.
-
fetchMembersAttributes(
{required String groupId, required List< String> userIds, List<String> ? keys}) → Future<Map< String, Map< >String, String> > - ~english Gets custom attributes of multiple group members by attribute key.
-
fetchMuteListFromServer(
String groupId, {int pageSize = 200, int pageNum = 1}) → Future< Map< String, int> > - ~english Gets the mute list of the group from the server.
-
fetchPublicGroupsFromServer(
{int pageSize = 200, String? cursor}) → Future< ChatCursorResult< ChatGroupInfo> > - ~english Gets public groups from the server with pagination.
-
getEventHandler(
String identifier) → ChatGroupEventHandler? - ~english Get the group event handler.
-
getGroupWithId(
String groupId) → Future< ChatGroup?> - ~english Gets the group instance from the cache by group ID.
-
getJoinedGroups(
) → Future< List< ChatGroup> > - ~english Gets all groups of the current user from the cache.
-
inviterUser(
String groupId, List< String> members, {String? reason}) → Future<void> - ~english Invites users to join the group.
-
isMemberInAllowListFromServer(
String groupId) → Future< bool> - ~english Gets whether the member is on the allow list of the group.
-
joinPublicGroup(
String groupId) → Future< void> - ~english Joins a public group.
-
leaveGroup(
String groupId) → Future< void> - ~english Leaves a group.
-
muteAllMembers(
String groupId) → Future< void> - ~english Mutes all members.
-
muteMembers(
String groupId, List< String> members, {int duration = -1}) → Future<void> - ~english Mutes group members.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAdmin(
String groupId, String adminId) → Future< void> - ~english Removes a group admin.
-
removeAllowList(
String groupId, List< String> members) → Future<void> - ~english Removes members from the allow list of the group.
-
removeEventHandler(
String identifier) → void - ~english Remove the group event handler.
- ~english Removes a shared file of the group.
-
removeMemberAttributes(
{required String groupId, required List< String> keys, String? userId}) → Future<void> - ~english Removes custom attributes of a group member.
-
removeMembers(
String groupId, List< String> members) → Future<void> - ~english Removes a member from the group.
-
requestToJoinPublicGroup(
String groupId, {String? reason}) → Future< void> - ~english Requests to join a group.
-
setMemberAttributes(
{required String groupId, required Map< String, String> attributes, String? userId}) → Future<void> - ~english Sets custom attributes of a group member.
-
toString(
) → String -
A string representation of this object.
inherited
-
unblockGroup(
String groupId) → Future< void> - ~english Unblocks group messages.
-
unblockMembers(
String groupId, List< String> members) → Future<void> - ~english Removes users from the group block list.
-
unMuteAllMembers(
String groupId) → Future< void> - ~english Unmutes all members.
-
unMuteMembers(
String groupId, List< String> members) → Future<void> - ~english Unmutes group members.
-
updateGroupAnnouncement(
String groupId, String announcement) → Future< void> - ~english Updates the group announcement.
-
updateGroupExtension(
String groupId, String extension) → Future< void> - ~english Updates the group extension field.
- ~english Uploads the shared file to the group.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited