JmessageFlutter class Null safety

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

Operators

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