This commit is contained in:
hrxiang
2022-06-27 18:20:00 +08:00
parent 4132338633
commit 7a68e13398
12 changed files with 24 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
/// 会话强提示内容
class GroupAtType {
/// 无提示
/// 取消所有提示即调用了resetConversationGroupAtType方法
static const atNormal = 0;
/// @了我提示

View File

@@ -1,3 +1,4 @@
/// 当前flutter平台仅支持Android/ios
class IMPlatform {
/// IOS
static const ios = 1;

View File

@@ -1,3 +1,4 @@
/// callback类型
class ListenerType {
static final simpleMsgListener = 'simpleMsgListener';
static final connectListener = 'connectListener';

View File

@@ -83,6 +83,7 @@ class MessageType {
/// 用户信息改变
static const userInfoUpdatedNotification = 1303;
static const userNotificationEnd = 1399;
/// OA通知
@@ -122,6 +123,7 @@ class MessageType {
/// 解散群
static const dismissGroupNotification = 1511;
static const groupNotificationEnd = 1599;
/// 群成员被禁言
@@ -143,6 +145,7 @@ class MessageType {
/// 信令
static const signalingNotification = 1601;
static const signalingNotificationEnd = 1699;
/// 阅后即焚

View File

@@ -18,7 +18,7 @@ class OnConversationListener {
this.onSyncServerStart,
});
/// 会话发改变
/// 会话发改变
void conversationChanged(List<ConversationInfo> list) {
if (onConversationChanged != null) onConversationChanged!(list);
}
@@ -28,6 +28,12 @@ class OnConversationListener {
if (onNewConversation != null) onNewConversation!(list);
}
/// 未读消息总数发送改变
void totalUnreadMessageCountChanged(int i) {
if (onTotalUnreadMessageCountChanged != null)
onTotalUnreadMessageCountChanged!(i);
}
void syncServerFailed() {
if (onSyncServerFailed != null) onSyncServerFailed!();
}
@@ -39,10 +45,4 @@ class OnConversationListener {
void syncServerStart() {
if (onSyncServerStart != null) onSyncServerStart!();
}
/// 未读消息总数发送改变
void totalUnreadMessageCountChanged(int i) {
if (onTotalUnreadMessageCountChanged != null)
onTotalUnreadMessageCountChanged!(i);
}
}

View File

@@ -4,6 +4,7 @@ class OnMsgSendProgressListener {
OnMsgSendProgressListener({this.onProgress});
/// 消息发送进度
void progress(String clientMsgID, int progress) {
if (null != onProgress) onProgress!(clientMsgID, progress);
}

View File

@@ -1,3 +1,4 @@
/// 组织架构监听
class OnOrganizationListener {
Function()? onOrganizationUpdated;

View File

@@ -1,5 +1,6 @@
import 'package:flutter_openim_sdk/src/models/signaling_info.dart';
/// 信令监听
class OnSignalingListener {
final Function(SignalingInfo info)? onInvitationCancelled;
final Function(SignalingInfo info)? onInvitationTimeout;

View File

@@ -1,12 +1,13 @@
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
/// 当前用户资料监听
class OnUserListener {
/// The information of the logged-in user has been updated
Function(UserInfo info)? onSelfInfoUpdated;
OnUserListener({this.onSelfInfoUpdated});
/// 自身信息发送变化
/// 自身信息发送变化回调
void selfInfoUpdated(UserInfo info) {
onSelfInfoUpdated?.call(info);
}

View File

@@ -1,3 +1,4 @@
/// 朋友圈监听
class OnWorkMomentsListener {
Function()? onRecvNewNotification;

View File

@@ -323,7 +323,7 @@ class IMManager {
));
}
@deprecated
/// 反初始化SDK
Future<dynamic> unInitSDK() {
return _channel.invokeMethod('unInitSDK', _buildParam({}));
}
@@ -381,7 +381,7 @@ class IMManager {
}));
/// 上传图片到服务器
/// [path]图片路径
/// [path] 图片路径
/// [token] im token
/// [objectStorage] 存储对象 cos/minio
Future uploadImage({