JmessageFlutter class

Constructors

JmessageFlutter()
factory
JmessageFlutter.private(MethodChannel channel, Platform platform)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
platformVersion Future<String>
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

acceptInvitation({String username, String appKey}) Future<void>
addClickMessageNotificationListener(JMMessageEventListener callback) → dynamic
addContactNotifyListener(JMContactNotifyListener callback) → dynamic
addGroupAdmins({String groupId, List<String> usernames, String appKey}) Future<void>
addGroupMembers({String id, List<String> usernameArray, String appKey}) Future<void>
addLoginStateChangedListener(JMLoginStateChangedListener callback) → dynamic
addMessageRetractListener(JMMessageRetractListener callback) → dynamic
addReceiveApplyJoinGroupApprovalListener(JMReceiveApplyJoinGroupApprovalListener callback) → dynamic
addReceiveChatRoomMessageListener(JMReceiveChatRoomMessageListener callback) → dynamic
addReceiveGroupAdminApprovalListener(JMReceiveGroupAdminApprovalListener callback) → dynamic
addReceiveGroupAdminRejectListener(JMReceiveGroupAdminRejectListener callback) → dynamic
addReceiveMessageListener(JMMessageEventListener callback) → dynamic
addReceiveMessageReceiptStatusChangelistener(JMMessageReceiptStatusChangeListener callback) → dynamic
addReceiveTransCommandListener(JMReceiveTransCommandListener callback) → dynamic
addSyncOfflineMessageListener(JMSyncOfflineMessageListener callback) → dynamic
addSyncRoamingMessageListener(JMSyncRoamingMessageListener callback) → dynamic
addUsersToBlacklist({List<String> usernameArray, String appKey}) Future<void>
applyJoinGroup({String groupId, String reason}) Future<void>
applyPushAuthority([JMNotificationSettingsIOS iosSettings = const JMNotificationSettingsIOS()]) → void
申请推送权限,注意这个方法只会向用户弹出一次推送权限请求(如果用户不同意,之后只能用户到设置页面里面勾选相应权限),需要开发者选择合适的时机调用。
blockGroupMessage({String id, bool isBlock}) Future<void>
changeGroupType({String groupId, JMGroupType type}) Future<void>
createConversation({dynamic target}) Future<JMConversationInfo>
createGroup({JMGroupType groupType: JMGroupType.private, String name, String desc}) Future<String>
createMessage({JMMessageType type, dynamic targetType, String text, String path, String fileName, Map customObject, double latitude, double longitude, int scale, String address, Map extras}) Future
declineInvitation({String username, String reason, String appKey}) Future<void>
deleteConversation({dynamic target}) Future<void>
deleteMessageById({dynamic type, String messageId}) Future<void>
删除本地单条消息 [...]
dissolveGroup({String groupId}) Future<void>
downloadFile({dynamic target, String messageId}) Future<Map>
下载文件 [...]
downloadOriginalGroupAvatar({String id}) Future<Map>
downloadOriginalImage({dynamic target, String messageId}) Future<Map>
下载原图 [...]
downloadOriginalUserAvatar({String username, String appKey}) Future<Map>
downloadThumbGroupAvatar({String id}) Future<Map>
downloadThumbImage({dynamic target, String messageId}) Future<Map>
下载缩略图 [...]
downloadThumbUserAvatar({String username, String appKey}) Future<Map>
downloadVoiceFile({dynamic target, String messageId}) Future<Map>
下载语音 [...]
enterChatRoom({String roomId}) Future<JMConversationInfo>
enterConversation({dynamic target}) Future<void>
exitChatRoom({String roomId}) Future<void>
exitConversation({dynamic target}) Future<void>
exitGroup({String id}) Future<void>
getAllUnreadCount() Future<num>
getBlacklist() Future<List<JMUserInfo>>
getBlockedGroupList() Future<List<JMGroupInfo>>
getChatRoomConversation({String roomId}) Future<JMConversationInfo>
getChatRoomConversationList() Future<List<JMConversationInfo>>
getConversation({dynamic target}) Future<JMConversationInfo>
getConversations() Future<List<JMConversationInfo>>
getFriends() Future<List<JMUserInfo>>
getGroupIds() Future<List<String>>
getGroupInfo({String id}) Future<JMGroupInfo>
getGroupMembers({String id}) Future<List<JMGroupMemberInfo>>
getHistoryMessages({dynamic type, int from, int limit, bool isDescend: false}) Future<List>
批量获取本地历史消息 [...]
getMessageById({dynamic type, String messageId}) Future
获取本地单条消息 [...]
getMessageByServerMessageId({dynamic type, String serverMessageId}) Future
获取本地单条消息 @param target 聊天对象, JMSingle | JMGroup @param serverMessageId 服务器返回的 serverMessageId,非本地数据库中的消息id,
getMessageHaveReadStatus({dynamic target, String msgId}) Future<bool>
getMessageReceiptDetails({dynamic target, String msgId, JMCallback callback}) → void
getMessageUnreceiptCount({dynamic target, String msgId}) Future<int>
getMyInfo() Future<JMUserInfo>
getNoDisturbList() Future<Map>
getPublicGroupInfos({String appKey, num start, num count}) Future<List<JMGroupInfo>>
getUserInfo({String username, String appKey}) Future<JMUserInfo>
groupSilenceMembers({String groupId}) Future<List<JMUserInfo>>
init({bool isOpenMessageRoaming, String appkey, String channel, bool isProduction: false}) → void
isGroupBlocked({String id}) Future<bool>
isNoDisturbGlobal() Future<bool>
isSilenceMember({String groupId, String username, String appKey}) Future<bool>
login({String username, String password}) Future<JMUserInfo>
logout() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
processApplyJoinGroup({List<String> events, bool isAgree, bool isRespondInviter, String reason}) Future<void>
removeClickMessageNotificationListener(JMMessageEventListener callback) → dynamic
removeContactNotifyListener(JMContactNotifyListener callback) → dynamic
removeFromFriendList({String username, String appKey}) Future<void>
removeGroupAdmins({String groupId, List<String> usernames, String appKey}) Future<void>
removeGroupMembers({String id, List<String> usernames, String appKey}) Future<void>
removeLoginStateChangedListener(JMLoginStateChangedListener callback) → dynamic
removeMessageReceiptStatusChangelistener(JMMessageReceiptStatusChangeListener callback) → dynamic
removeMessageRetractListener(JMMessageRetractListener callback) → dynamic
removeReceiveApplyJoinGroupApprovalListener(JMReceiveApplyJoinGroupApprovalListener callback) → dynamic
removeReceiveChatRoomMessageListener(JMReceiveChatRoomMessageListener callback) → dynamic
removeReceiveGroupAdminApprovalListener(JMReceiveGroupAdminApprovalListener callback) → dynamic
removeReceiveGroupAdminRejectListener(JMReceiveGroupAdminRejectListener callback) → dynamic
removeReceiveMessageListener(JMMessageEventListener callback) → dynamic
removeReceiveTransCommandListener(JMReceiveTransCommandListener callback) → dynamic
removeSyncOfflineMessageListener(JMSyncOfflineMessageListener callback) → dynamic
removeSyncRoamingMessageListener(JMSyncRoamingMessageListener callback) → dynamic
removeUsersFromBlacklist({List<String> usernameArray, String appKey}) Future<void>
resetUnreadMessageCount({dynamic target}) Future<void>
retractMessage({dynamic target, String serverMessageId}) Future<void>
消息撤回 [...]
sendCrossDeviceTransCommand({String message, JMPlatformType platform}) Future<void>
设备间透传命令
sendCustomMessage({dynamic type, Map customObject, JMMessageSendOptions sendOption, Map extras}) Future<JMCustomMessage>
sendFileMessage({dynamic type, String path, JMMessageSendOptions sendOption, Map extras}) Future<JMFileMessage>
sendImageMessage({dynamic type, String path, JMMessageSendOptions sendOption, Map extras}) Future<JMImageMessage>
sendInvitationRequest({String username, String reason, String appKey}) Future<void>
sendLocationMessage({dynamic type, double latitude, double longitude, int scale, String address, JMMessageSendOptions sendOption, Map extras}) Future<JMLocationMessage>
sendMessage({JMNormalMessage message, JMMessageSendOptions sendOption}) Future
message 可能是 JMTextMessage | JMVoiceMessage | JMImageMessage | JMFileMessage | JMCustomMessage; NOTE: 不要传接收到的消息进去,只能传通过 createMessage 创建的消息。
sendMessageTransCommand({String message, dynamic target}) Future<void>
会话间透传命令,只支持 single、group,不支持 chatRoom
sendTextMessage({dynamic type, String text, JMMessageSendOptions sendOption, Map extras}) Future<JMTextMessage>
sendVoiceMessage({dynamic type, String path, JMMessageSendOptions sendOption, Map extras}) Future<JMVoiceMessage>
setBadge({int badge}) Future<void>
iOS Only 设置应用 Badge(小红点) [...]
setConversationExtras({dynamic type, Map extras}) Future<JMConversationInfo>
setDebugMode({bool enable: false}) → void
setGroupMemberSilence({String groupId, bool isSilence, String username, String appKey}) Future<void>
setGroupNickname({String groupId, String nickName, String username, String appKey}) Future<void>
setMessageHaveRead({dynamic target, String msgId}) Future<bool>
setNoDisturb({dynamic target, bool isNoDisturb}) Future<void>
setNoDisturbGlobal({bool isNoDisturb}) Future<void>
toString() String
Returns a string representation of this object.
inherited
transferGroupOwner({String groupId, String username, String appKey}) Future<void>
updateFriendNoteName({String username, String noteName, String appKey}) Future<void>
updateFriendNoteText({String username, String noteText, String appKey}) Future<void>
updateGroupAvatar({String id, String imgPath}) Future<void>
updateGroupInfo({String id, String newName, String newDesc}) Future<void>
updateMyAvatar({String imgPath}) Future<void>
updateMyInfo({int birthday, String nickname, String signature, String region, String address, JMGender gender, Map extras}) Future<void>
updateMyPassword({String oldPwd, String newPwd}) Future<void>
userRegister({String username, String password, String nickname}) Future<void>

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited