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

@@ -8,7 +8,7 @@
## 方法名、参数、返回值说明 ## 方法说明
#### IMManager初始化管理 #### IMManager初始化管理
@@ -200,6 +200,8 @@
## 方法名、参数、返回值说明
- ##### initSDK初始化SDK - ##### initSDK初始化SDK
``` ```

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -323,7 +323,7 @@ class IMManager {
)); ));
} }
@deprecated /// 反初始化SDK
Future<dynamic> unInitSDK() { Future<dynamic> unInitSDK() {
return _channel.invokeMethod('unInitSDK', _buildParam({})); return _channel.invokeMethod('unInitSDK', _buildParam({}));
} }