Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3c5e640abf | ||
![]() |
87360c5f69 | ||
![]() |
a4e7ae13ee | ||
![]() |
2da3a5e557 | ||
|
cfc94c06da | ||
|
3527c80e7b | ||
|
cdb994d5e3 | ||
|
e12799da0b | ||
|
0c7124a2a5 | ||
|
b1fa710117 | ||
|
b06dbe122e | ||
|
021a262325 | ||
|
9994a3939d | ||
|
c1f62d0661 |
@ -52,6 +52,5 @@ android {
|
||||
dependencies {
|
||||
// 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar
|
||||
// implementation 'io.openim:core-sdk:0.0.1@aar'
|
||||
// api 'io.openim:core-sdk:2.3.5-t44@aar'
|
||||
implementation 'io.openim:core-sdk:3.0.0-beta08@aar'
|
||||
implementation 'io.openim:core-sdk:3.1.0-e@aar'
|
||||
}
|
@ -23,6 +23,7 @@ import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
||||
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
||||
import io.openim.flutter_openim_sdk.manager.IMManager;
|
||||
import io.openim.flutter_openim_sdk.manager.MessageManager;
|
||||
import io.openim.flutter_openim_sdk.manager.SignalingManager;
|
||||
import io.openim.flutter_openim_sdk.manager.UserManager;
|
||||
|
||||
|
||||
@ -42,9 +43,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler,
|
||||
private static MessageManager messageManager;
|
||||
private static ConversationManager conversationManager;
|
||||
private static GroupManager groupManager;
|
||||
// private static SignalingManager signalingManager;
|
||||
// private static WorkMomentsManager workMomentsManager;
|
||||
// private static OrganizationManager organizationManager;
|
||||
private static SignalingManager signalingManager;
|
||||
private static Activity activity;
|
||||
private static Context context;
|
||||
private ConnectivityListener connectivityListener;
|
||||
@ -58,9 +57,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler,
|
||||
FlutterOpenimSdkPlugin.messageManager = new MessageManager();
|
||||
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager();
|
||||
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
||||
// FlutterOpenimSdkPlugin.signalingManager = new SignalingManager();
|
||||
// FlutterOpenimSdkPlugin.workMomentsManager = new WorkMomentsManager();
|
||||
// FlutterOpenimSdkPlugin.organizationManager = new OrganizationManager();
|
||||
FlutterOpenimSdkPlugin.signalingManager = new SignalingManager();
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,13 +19,15 @@ public class OnBaseListener implements Base {
|
||||
|
||||
@Override
|
||||
public void onError(int l, String s) {
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||
CommonUtil.runMainThreadReturn(result, s);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
|
||||
public class OnOrganizationListener /*implements open_im_sdk_callback.OnOrganizationListener*/ {
|
||||
// @Override
|
||||
// public void onOrganizationUpdated() {
|
||||
// CommonUtil.emitEvent("organizationListener", "onOrganizationUpdated", null);
|
||||
// }
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.PutFileCallback;
|
||||
|
||||
public class OnPutFileListener implements PutFileCallback {
|
||||
final private MethodChannel.Result result;
|
||||
final private Object putID;
|
||||
|
||||
public OnPutFileListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
this.putID = call.argument("putID");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashComplete(String hash, long total) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("hash", hash);
|
||||
values.put("total", total);
|
||||
CommonUtil.emitEvent("putFileListener", "hashComplete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashProgress(long current, long total) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("current", current);
|
||||
values.put("total", total);
|
||||
CommonUtil.emitEvent("putFileListener", "hashProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open(long size) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("size", size);
|
||||
CommonUtil.emitEvent("putFileListener", "open", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putComplete(long total, long putType) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("putType", putType);
|
||||
values.put("total", total);
|
||||
CommonUtil.emitEvent("putFileListener", "putComplete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putProgress(long save, long current, long total) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("save", save);
|
||||
values.put("current", current);
|
||||
values.put("total", total);
|
||||
CommonUtil.emitEvent("putFileListener", "putProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStart(long current, long total) {
|
||||
if (null != putID) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("putID", putID);
|
||||
values.put("current", current);
|
||||
values.put("total", total);
|
||||
CommonUtil.emitEvent("putFileListener", "putStart", values);
|
||||
}
|
||||
}
|
||||
}
|
@ -34,10 +34,10 @@ public class OnSignalingListener implements open_im_sdk_callback.OnSignalingList
|
||||
CommonUtil.emitEvent("signalingListener", "onInviteeRejectedByOtherDevice", s);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onReceiveCustomSignal(String s) {
|
||||
// CommonUtil.emitEvent("signalingListener", "onReceiveCustomSignal", s);
|
||||
// }
|
||||
@Override
|
||||
public void onReceiveCustomSignal(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onReceiveCustomSignal", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveNewInvitation(String s) {
|
||||
@ -54,10 +54,10 @@ public class OnSignalingListener implements open_im_sdk_callback.OnSignalingList
|
||||
CommonUtil.emitEvent("signalingListener", "onRoomParticipantDisconnected", s);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onStreamChange(String s) {
|
||||
// CommonUtil.emitEvent("signalingListener", "onStreamChange", s);
|
||||
// }
|
||||
@Override
|
||||
public void onStreamChange(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onStreamChange", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHangUp(String s) {
|
||||
|
@ -0,0 +1,110 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.UploadFileCallback;
|
||||
|
||||
public class OnUploadFileListener implements UploadFileCallback {
|
||||
final private MethodChannel.Result result;
|
||||
final private Object id;
|
||||
|
||||
public OnUploadFileListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
this.id = call.argument("id");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void complete(long size, String url, long type) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("size", size);
|
||||
values.put("url", url);
|
||||
values.put("type", type);
|
||||
CommonUtil.emitEvent("uploadFileListener", "complete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashPartComplete(String partHash, String fileHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("partHash", partHash);
|
||||
values.put("fileHash", fileHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "hashPartComplete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashPartProgress(long index, long size, String partHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("index", index);
|
||||
values.put("size", size);
|
||||
values.put("partHash", partHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "hashPartProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open(long size) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("size", size);
|
||||
CommonUtil.emitEvent("uploadFileListener", "open", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void partSize(long partSize, long num) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("partSize", partSize);
|
||||
values.put("num", num);
|
||||
CommonUtil.emitEvent("uploadFileListener", "partSize", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadComplete(long fileSize, long streamSize, long storageSize) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("fileSize", fileSize);
|
||||
values.put("streamSize", streamSize);
|
||||
values.put("storageSize", storageSize);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadID(String uploadID) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("uploadID", uploadID);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadID", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadPartComplete(long index, long partSize, String partHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("index", index);
|
||||
values.put("partSize", partSize);
|
||||
values.put("partHash", partHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadPartComplete", values);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
|
||||
public class OnWorkMomentsListener /*implements open_im_sdk_callback.OnWorkMomentsListener*/ {
|
||||
|
||||
|
||||
// @Override
|
||||
// public void onRecvNewNotification() {
|
||||
// CommonUtil.emitEvent("workMomentsListener", "OnRecvNewNotification", null);
|
||||
// }
|
||||
}
|
@ -175,4 +175,22 @@ public class ConversationManager extends BaseManager {
|
||||
value(methodCall, "burnDuration")
|
||||
);
|
||||
}
|
||||
|
||||
public void setConversationIsMsgDestruct(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationIsMsgDestruct(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "isMsgDestruct")
|
||||
);
|
||||
}
|
||||
|
||||
public void setConversationMsgDestructTime(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationMsgDestructTime(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
int2long(methodCall, "duration")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnConnListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnListenerForService;
|
||||
import io.openim.flutter_openim_sdk.listener.OnPutFileListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnUploadFileListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
@ -38,15 +37,15 @@ public class IMManager extends BaseManager {
|
||||
}
|
||||
|
||||
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus());
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus(value(methodCall, "operationID")));
|
||||
}
|
||||
|
||||
public void putFile(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.putFile(
|
||||
public void uploadFile(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.uploadFile(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall),
|
||||
new OnPutFileListener(result, methodCall)
|
||||
new OnUploadFileListener(result, methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
//package io.openim.flutter_openim_sdk.manager;
|
||||
//
|
||||
//import io.flutter.plugin.common.MethodCall;
|
||||
//import io.flutter.plugin.common.MethodChannel;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnOrganizationListener;
|
||||
//import open_im_sdk.Open_im_sdk;
|
||||
//
|
||||
//public class OrganizationManager extends BaseManager {
|
||||
//
|
||||
// public void setOrganizationListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setOrganizationListener(new OnOrganizationListener());
|
||||
//
|
||||
// result.success(null);
|
||||
// }
|
||||
//
|
||||
// public void getSubDepartment(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getSubDepartment(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "departmentID"),
|
||||
// int2long(methodCall, "offset"),
|
||||
// int2long(methodCall, "count")
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public void getDepartmentMember(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getDepartmentMember(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "departmentID"),
|
||||
// int2long(methodCall, "offset"),
|
||||
// int2long(methodCall, "count")
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public void getUserInDepartment(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getUserInDepartment(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "userID")
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public void getDepartmentMemberAndSubDepartment(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getDepartmentMemberAndSubDepartment(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "departmentID")
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public void getDepartmentInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getDepartmentInfo(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "departmentID")
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public void searchOrganization(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.searchOrganization(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "searchParam"),
|
||||
// int2long(methodCall, "offset"),
|
||||
// int2long(methodCall, "count")
|
||||
// );
|
||||
// }
|
||||
//}
|
@ -1,125 +1,131 @@
|
||||
//package io.openim.flutter_openim_sdk.manager;
|
||||
//
|
||||
//import io.flutter.plugin.common.MethodCall;
|
||||
//import io.flutter.plugin.common.MethodChannel;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnSignalingListener;
|
||||
//import open_im_sdk.Open_im_sdk;
|
||||
//
|
||||
//public class SignalingManager extends BaseManager {
|
||||
//
|
||||
// public void setSignalingListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setSignalingListener(new OnSignalingListener());
|
||||
//
|
||||
// result.success(null);
|
||||
// }
|
||||
//
|
||||
// public void signalingInvite(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingInvite(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingInviteInGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingInviteInGroup(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingAccept(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingAccept(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingReject(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingReject(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingCancel(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingCancel(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingHungUp(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingHungUp(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "signalingInfo"));
|
||||
// }
|
||||
//
|
||||
// public void signalingGetRoomByGroupID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingGetRoomByGroupID(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "groupID"));
|
||||
// }
|
||||
//
|
||||
// public void signalingGetTokenByRoomID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingGetTokenByRoomID(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "roomID"));
|
||||
// }
|
||||
//
|
||||
// public void signalingUpdateMeetingInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingUpdateMeetingInfo(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "info"));
|
||||
// }
|
||||
//
|
||||
// public void signalingCreateMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingCreateMeeting(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "info"));
|
||||
// }
|
||||
//
|
||||
// public void signalingJoinMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingJoinMeeting(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// jsonValue(methodCall, "info"));
|
||||
// }
|
||||
//
|
||||
// public void signalingOperateStream(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingOperateStream(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "streamType"),
|
||||
// value(methodCall, "roomID"),
|
||||
// value(methodCall, "userID"),
|
||||
// value(methodCall, "mute"),
|
||||
// value(methodCall, "muteAll"));
|
||||
// }
|
||||
//
|
||||
// public void signalingGetMeetings(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingGetMeetings(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"));
|
||||
// }
|
||||
//
|
||||
// public void signalingCloseRoom(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingCloseRoom(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "roomID"));
|
||||
// }
|
||||
//
|
||||
// public void signalingSendCustomSignal(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.signalingSendCustomSignal(
|
||||
// new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "customInfo"),
|
||||
// value(methodCall, "roomID"));
|
||||
// }
|
||||
//}
|
||||
package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnSignalingListener;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class SignalingManager extends BaseManager {
|
||||
|
||||
public void setSignalingListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setSignalingListener(new OnSignalingListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void signalingInvite(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingInvite(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingInviteInGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingInviteInGroup(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingAccept(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingAccept(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingReject(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingReject(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingCancel(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCancel(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingHungUp(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingHungUp(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingGetRoomByGroupID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetRoomByGroupID(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"));
|
||||
}
|
||||
|
||||
public void signalingGetTokenByRoomID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetTokenByRoomID(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void signalingUpdateMeetingInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingUpdateMeetingInfo(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingCreateMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCreateMeeting(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingJoinMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingJoinMeeting(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingOperateStream(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingOperateStream(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "streamType"),
|
||||
value(methodCall, "roomID"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "mute"),
|
||||
value(methodCall, "muteAll"));
|
||||
}
|
||||
|
||||
public void signalingGetMeetings(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetMeetings(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"));
|
||||
}
|
||||
|
||||
public void signalingCloseRoom(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCloseRoom(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void signalingSendCustomSignal(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingSendCustomSignal(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "customInfo"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void getSignalingInvitationInfoStartApp(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSignalingInvitationInfoStartApp(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"));
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
//package io.openim.flutter_openim_sdk.manager;
|
||||
//
|
||||
//import io.flutter.plugin.common.MethodCall;
|
||||
//import io.flutter.plugin.common.MethodChannel;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
//import io.openim.flutter_openim_sdk.listener.OnWorkMomentsListener;
|
||||
//import open_im_sdk.Open_im_sdk;
|
||||
//
|
||||
//public class WorkMomentsManager extends BaseManager {
|
||||
//
|
||||
// public void setWorkMomentsListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setWorkMomentsListener(new OnWorkMomentsListener());
|
||||
//
|
||||
// result.success(null);
|
||||
// }
|
||||
//
|
||||
// public void getWorkMomentsUnReadCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getWorkMomentsUnReadCount(new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"));
|
||||
// }
|
||||
//
|
||||
// public void getWorkMomentsNotification(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getWorkMomentsNotification(new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"),
|
||||
// int2long(methodCall, "offset"),
|
||||
// int2long(methodCall, "count"));
|
||||
// }
|
||||
//
|
||||
// public void clearWorkMomentsNotification(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.clearWorkMomentsNotification(new OnBaseListener(result, methodCall),
|
||||
// value(methodCall, "operationID"));
|
||||
// }
|
||||
//}
|
@ -33,6 +33,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
runMainThread(() -> {
|
||||
Map<String, Object> res = new ArrayMap<>();
|
||||
if (null != type) {
|
||||
@ -47,7 +48,7 @@ public class CommonUtil {
|
||||
if (null != errMsg) {
|
||||
res.put("errMsg", errMsg);
|
||||
}
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "{ method:" + method + ", type:" + type + " }");
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " { method:" + method + ", type:" + type + " }");
|
||||
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
||||
});
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_openim_sdk (0.0.1):
|
||||
- Flutter
|
||||
- OpenIMSDKCore (= 3.0.0)
|
||||
- OpenIMSDKCore (3.0.0)
|
||||
- OpenIMSDKCore (= 3.0.0-e)
|
||||
- OpenIMSDKCore (3.0.0-e)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
@ -21,8 +21,8 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_openim_sdk: 12daf3769f8bf40001970304445b6155c146b7eb
|
||||
OpenIMSDKCore: cf4fa9f9599cc6741f7acc5ef260647f34541e87
|
||||
flutter_openim_sdk: 9b4a8c3f8bc581249d074c4090b32d743adee0e0
|
||||
OpenIMSDKCore: b6b5620eb31da76b9c0142e703dff2924341871a
|
||||
|
||||
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
||||
|
||||
|
@ -6,7 +6,7 @@ packages:
|
||||
description:
|
||||
name: async
|
||||
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.10.0"
|
||||
boolean_selector:
|
||||
@ -14,7 +14,7 @@ packages:
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
characters:
|
||||
@ -22,7 +22,7 @@ packages:
|
||||
description:
|
||||
name: characters
|
||||
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
clock:
|
||||
@ -30,7 +30,7 @@ packages:
|
||||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
@ -38,7 +38,7 @@ packages:
|
||||
description:
|
||||
name: collection
|
||||
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.17.0"
|
||||
cupertino_icons:
|
||||
@ -46,7 +46,7 @@ packages:
|
||||
description:
|
||||
name: cupertino_icons
|
||||
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
fake_async:
|
||||
@ -54,7 +54,7 @@ packages:
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
@ -68,7 +68,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.3.5+4"
|
||||
version: "3.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -79,7 +79,7 @@ packages:
|
||||
description:
|
||||
name: js
|
||||
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.6.5"
|
||||
matcher:
|
||||
@ -87,7 +87,7 @@ packages:
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.13"
|
||||
material_color_utilities:
|
||||
@ -95,7 +95,7 @@ packages:
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
meta:
|
||||
@ -103,7 +103,7 @@ packages:
|
||||
description:
|
||||
name: meta
|
||||
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
path:
|
||||
@ -111,7 +111,7 @@ packages:
|
||||
description:
|
||||
name: path
|
||||
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
sky_engine:
|
||||
@ -124,7 +124,7 @@ packages:
|
||||
description:
|
||||
name: source_span
|
||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
stack_trace:
|
||||
@ -132,7 +132,7 @@ packages:
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
stream_channel:
|
||||
@ -140,7 +140,7 @@ packages:
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
string_scanner:
|
||||
@ -148,7 +148,7 @@ packages:
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
@ -156,7 +156,7 @@ packages:
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
@ -164,7 +164,7 @@ packages:
|
||||
description:
|
||||
name: test_api
|
||||
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.4.16"
|
||||
vector_math:
|
||||
@ -172,7 +172,7 @@ packages:
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
sdks:
|
||||
|
@ -111,7 +111,7 @@ public class ConversationManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
func setConversationBurnDuration(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationBurnDuration(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int: "burnDuration"])
|
||||
Open_im_sdkSetConversationBurnDuration(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int32: "burnDuration"])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ public class IMMananger: BaseServiceManager {
|
||||
self["login"] = login
|
||||
self["logout"] = logout
|
||||
self["getLoginStatus"] = getLoginStatus
|
||||
self["putFile"] = putFile
|
||||
self["uploadFile"] = uploadFile
|
||||
self["updateFcmToken"] = updateFcmToken
|
||||
self["setAppBackgroundStatus"] = setAppBackgroundStatus
|
||||
self["networkStatusChanged"] = networkStatusChanged
|
||||
@ -22,7 +22,7 @@ public class IMMananger: BaseServiceManager {
|
||||
selector: #selector(applicationWillEnterForeground),
|
||||
name: UIApplication.willEnterForegroundNotification,
|
||||
object: nil)
|
||||
|
||||
|
||||
NotificationCenter.default.addObserver(self,
|
||||
selector: #selector(applicationDidEnterBackground),
|
||||
name: UIApplication.didEnterBackgroundNotification,
|
||||
@ -51,7 +51,7 @@ public class IMMananger: BaseServiceManager {
|
||||
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: { _ in
|
||||
}), UUID().uuidString, true)
|
||||
}
|
||||
|
||||
|
||||
@objc
|
||||
fileprivate func applicationWillEnterForeground() {
|
||||
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: { _ in
|
||||
@ -72,11 +72,11 @@ public class IMMananger: BaseServiceManager {
|
||||
}
|
||||
|
||||
func getLoginStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
callBack(result, Open_im_sdkGetLoginStatus())
|
||||
callBack(result, Open_im_sdkGetLoginStatus(methodCall[string: "operationID"]))
|
||||
}
|
||||
|
||||
func putFile(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkPutFile(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString(),PutFileListener(channel: self.channel,putID: methodCall[string: "putID"]))
|
||||
func uploadFile(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUploadFile(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString(), UploadFileListener(channel: self.channel,id: methodCall[string: "id"]))
|
||||
}
|
||||
|
||||
func updateFcmToken(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
@ -102,7 +102,7 @@ public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol
|
||||
public func onConnectFailed(_ errCode: Int32, errMsg: String?) {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectFailed", errCode: errCode, errMsg: errMsg, data: nil)
|
||||
}
|
||||
|
||||
|
||||
public func onConnectSuccess() {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectSuccess", errCode: nil, errMsg: nil, data: nil)
|
||||
}
|
||||
@ -120,60 +120,78 @@ public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol
|
||||
}
|
||||
}
|
||||
|
||||
public class PutFileListener: NSObject, Open_im_sdk_callbackPutFileCallbackProtocol {
|
||||
public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbackProtocol {
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
private let putID: String
|
||||
private let id: String
|
||||
|
||||
init(channel:FlutterMethodChannel, putID: String) {
|
||||
init(channel:FlutterMethodChannel, id: String) {
|
||||
self.channel = channel
|
||||
self.putID = putID
|
||||
self.id = id
|
||||
}
|
||||
public func complete(_ size: Int64, url: String?, typ: Int) {
|
||||
var values: [String: Any] = [:]
|
||||
values["id"] = id
|
||||
values["size"] = size
|
||||
values["url"] = url
|
||||
values["type"] = typ
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "complete", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func hashComplete(_ hash: String?, total: Int64) {
|
||||
public func hashPartComplete(_ partsHash: String?, fileHash: String?) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["hash"] = hash
|
||||
values["total"] = total
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "hashComplete", errCode: nil, errMsg: nil, data: values)
|
||||
values["id"] = id
|
||||
values["partHash"] = partsHash
|
||||
values["fileHash"] = fileHash
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartComplete", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func hashProgress(_ current: Int64, total: Int64) {
|
||||
public func hashPartProgress(_ index: Int, size: Int64, partHash: String?) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["current"] = current
|
||||
values["total"] = total
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "hashProgress", errCode: nil, errMsg: nil, data: values)
|
||||
values["id"] = id
|
||||
values["index"] = index
|
||||
values["size"] = size
|
||||
values["partHash"] = partHash
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartProgress", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func open(_ size: Int64) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["id"] = id
|
||||
values["size"] = size
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "open", errCode: nil, errMsg: nil, data: values)
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "open", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func putComplete(_ total: Int64, putType: Int) {
|
||||
public func partSize(_ partSize: Int64, num: Int) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["putType"] = putType
|
||||
values["total"] = total
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "putComplete", errCode: nil, errMsg: nil, data: values)
|
||||
values["id"] = id
|
||||
values["partSize"] = partSize
|
||||
values["num"] = num
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "partSize", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func putProgress(_ save: Int64, current: Int64, total: Int64) {
|
||||
public func uploadComplete(_ fileSize: Int64, streamSize: Int64, storageSize: Int64) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["save"] = save
|
||||
values["current"] = current
|
||||
values["total"] = total
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "putProgress", errCode: nil, errMsg: nil, data: values)
|
||||
values["id"] = id
|
||||
values["fileSize"] = fileSize
|
||||
values["streamSize"] = streamSize
|
||||
values["storageSize"] = storageSize
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadProgress", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func putStart(_ current: Int64, total: Int64) {
|
||||
public func uploadID(_ uploadID: String?) {
|
||||
var values: [String: Any] = [:]
|
||||
values["putID"] = putID
|
||||
values["current"] = current
|
||||
values["total"] = total
|
||||
CommonUtil.emitEvent(channel: channel, method: "putFileListener", type: "putStart", errCode: nil, errMsg: nil, data: values)
|
||||
values["id"] = id
|
||||
values["uploadID"] = uploadID
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadID", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func uploadPartComplete(_ index: Int, partSize: Int64, partHash: String?) {
|
||||
var values: [String: Any] = [:]
|
||||
values["id"] = id
|
||||
values["index"] = index
|
||||
values["partSize"] = partSize
|
||||
values["partHash"] = partHash
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadPartComplete", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
}
|
||||
|
@ -1,148 +1,149 @@
|
||||
//import Foundation
|
||||
//import OpenIMCore
|
||||
//
|
||||
//public class SignalingManager: BaseServiceManager {
|
||||
//
|
||||
// public override func registerHandlers() {
|
||||
// super.registerHandlers()
|
||||
// self["setSignalingListener"] = setSignalingListener
|
||||
// self["signalingInvite"] = signalingInvite
|
||||
// self["signalingInviteInGroup"] = signalingInviteInGroup
|
||||
// self["signalingAccept"] = signalingAccept
|
||||
// self["signalingReject"] = signalingReject
|
||||
// self["signalingCancel"] = signalingCancel
|
||||
// self["signalingHungUp"] = signalingHungUp
|
||||
// self["signalingGetRoomByGroupID"] = signalingGetRoomByGroupID
|
||||
// self["signalingGetTokenByRoomID"] = signalingGetTokenByRoomID
|
||||
// self["signalingUpdateMeetingInfo"] = signalingUpdateMeetingInfo
|
||||
// self["signalingCreateMeeting"] = signalingCreateMeeting
|
||||
// self["signalingJoinMeeting"] = signalingJoinMeeting
|
||||
// self["signalingOperateStream"] = signalingOperateStream
|
||||
// self["signalingGetMeetings"] = signalingGetMeetings
|
||||
// self["signalingCloseRoom"] = signalingCloseRoom
|
||||
// self["signalingSendCustomSignal"] = signalingSendCustomSignal
|
||||
// }
|
||||
//
|
||||
// func setSignalingListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSetSignalingListener(SignalingListener(channel: channel))
|
||||
// callBack(result)
|
||||
// }
|
||||
//
|
||||
// func signalingInvite(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingInvite(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingInviteInGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingInviteInGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingAccept(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingAccept(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingReject(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingReject(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingCancel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingCancel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingHungUp(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingHungUp(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
// }
|
||||
//
|
||||
// func signalingGetRoomByGroupID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingGetRoomByGroupID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||
// }
|
||||
//
|
||||
// func signalingGetTokenByRoomID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingGetTokenByRoomID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
// }
|
||||
//
|
||||
// func signalingUpdateMeetingInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingUpdateMeetingInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
// }
|
||||
//
|
||||
// func signalingCreateMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingCreateMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
// }
|
||||
//
|
||||
// func signalingJoinMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingJoinMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
// }
|
||||
//
|
||||
// func signalingOperateStream(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingOperateStream(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "streamType"], methodCall[string: "roomID"], methodCall[string: "userID"], methodCall[bool: "mute"], methodCall[bool: "muteAll"])
|
||||
// }
|
||||
//
|
||||
// func signalingGetMeetings(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingGetMeetings(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
// }
|
||||
//
|
||||
// func signalingCloseRoom(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingCloseRoom(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
// }
|
||||
//
|
||||
// func signalingSendCustomSignal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSignalingSendCustomSignal(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "customInfo"], methodCall[string: "roomID"])
|
||||
// }
|
||||
//}
|
||||
//public class SignalingListener: NSObject, Open_im_sdk_callbackOnSignalingListenerProtocol {
|
||||
//
|
||||
//
|
||||
// private let channel:FlutterMethodChannel
|
||||
//
|
||||
// init(channel:FlutterMethodChannel) {
|
||||
// self.channel = channel
|
||||
// }
|
||||
//
|
||||
// public func onInvitationCancelled(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationCancelled", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onInvitationTimeout(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationTimeout", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onInviteeAccepted(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAccepted", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onInviteeAccepted(byOtherDevice s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAcceptedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onInviteeRejected(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejected", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onInviteeRejected(byOtherDevice s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejectedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onReceiveNewInvitation(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveNewInvitation", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onHangUp(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onHangUp", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onRoomParticipantConnected(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantConnected", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onRoomParticipantDisconnected(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantDisconnected", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onStreamChange(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onStreamChange", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
// public func onReceiveCustomSignal(_ s: String?) {
|
||||
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveCustomSignal", errCode: nil, errMsg: nil, data: s)
|
||||
// }
|
||||
//
|
||||
//}
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class SignalingManager: BaseServiceManager {
|
||||
|
||||
public override func registerHandlers() {
|
||||
super.registerHandlers()
|
||||
self["setSignalingListener"] = setSignalingListener
|
||||
self["signalingInvite"] = signalingInvite
|
||||
self["signalingInviteInGroup"] = signalingInviteInGroup
|
||||
self["signalingAccept"] = signalingAccept
|
||||
self["signalingReject"] = signalingReject
|
||||
self["signalingCancel"] = signalingCancel
|
||||
self["signalingHungUp"] = signalingHungUp
|
||||
self["signalingGetRoomByGroupID"] = signalingGetRoomByGroupID
|
||||
self["signalingGetTokenByRoomID"] = signalingGetTokenByRoomID
|
||||
self["signalingUpdateMeetingInfo"] = signalingUpdateMeetingInfo
|
||||
self["signalingCreateMeeting"] = signalingCreateMeeting
|
||||
self["signalingJoinMeeting"] = signalingJoinMeeting
|
||||
self["signalingOperateStream"] = signalingOperateStream
|
||||
self["signalingGetMeetings"] = signalingGetMeetings
|
||||
self["signalingCloseRoom"] = signalingCloseRoom
|
||||
self["signalingSendCustomSignal"] = signalingSendCustomSignal
|
||||
}
|
||||
|
||||
func setSignalingListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetSignalingListener(SignalingListener(channel: channel))
|
||||
callBack(result)
|
||||
}
|
||||
|
||||
func signalingInvite(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingInvite(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingInviteInGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingInviteInGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingAccept(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingAccept(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingReject(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingReject(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingCancel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCancel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingHungUp(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingHungUp(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingGetRoomByGroupID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetRoomByGroupID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||
}
|
||||
|
||||
func signalingGetTokenByRoomID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetTokenByRoomID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
}
|
||||
|
||||
func signalingUpdateMeetingInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingUpdateMeetingInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingCreateMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCreateMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingJoinMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingJoinMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingOperateStream(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingOperateStream(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "streamType"], methodCall[string: "roomID"], methodCall[string: "userID"], methodCall[bool: "mute"], methodCall[bool: "muteAll"])
|
||||
}
|
||||
|
||||
func signalingGetMeetings(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetMeetings(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func signalingCloseRoom(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCloseRoom(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
}
|
||||
|
||||
func signalingSendCustomSignal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingSendCustomSignal(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "customInfo"], methodCall[string: "roomID"])
|
||||
}
|
||||
}
|
||||
|
||||
public class SignalingListener: NSObject, Open_im_sdk_callbackOnSignalingListenerProtocol {
|
||||
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onInvitationCancelled(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationCancelled", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInvitationTimeout(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationTimeout", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeAccepted(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAccepted", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeAccepted(byOtherDevice s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAcceptedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeRejected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeRejected(byOtherDevice s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejectedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onReceiveNewInvitation(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveNewInvitation", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onHangUp(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onHangUp", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onRoomParticipantConnected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantConnected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onRoomParticipantDisconnected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantDisconnected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onStreamChange(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onStreamChange", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onReceiveCustomSignal(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveCustomSignal", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
let messageManager: MessageManager
|
||||
let groupManager: GroupManager
|
||||
let userManger: UserManager
|
||||
// let signalingManager: SignalingManager
|
||||
let signalingManager: SignalingManager
|
||||
// let workMomentsManager: WorkMomentsManager
|
||||
// let organizationManager: OrganizationManager
|
||||
|
||||
@ -19,7 +19,7 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
self.messageManager = MessageManager(channel: channel)
|
||||
self.groupManager = GroupManager(channel: channel)
|
||||
self.userManger = UserManager(channel: channel)
|
||||
// self.signalingManager = SignalingManager(channel: channel)
|
||||
self.signalingManager = SignalingManager(channel: channel)
|
||||
// self.workMomentsManager = WorkMomentsManager(channel: channel)
|
||||
// self.organizationManager = OrganizationManager(channel: channel)
|
||||
}
|
||||
@ -45,8 +45,8 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
groupManager.handleMethod(call: call, result: result)
|
||||
case "userManager":
|
||||
userManger.handleMethod(call: call, result: result)
|
||||
// case "signalingManager":
|
||||
// signalingManager.handleMethod(call: call, result: result)
|
||||
case "signalingManager":
|
||||
signalingManager.handleMethod(call: call, result: result)
|
||||
// case "workMomentsManager":
|
||||
// workMomentsManager.handleMethod(call: call, result: result)
|
||||
// case "organizationManager":
|
||||
|
@ -17,7 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
|
||||
s.dependency 'OpenIMSDKCore','3.0.0'
|
||||
s.dependency 'OpenIMSDKCore','3.1.0-e'
|
||||
s.static_framework = true
|
||||
# s.vendored_frameworks = 'Framework/*.framework'
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
|
@ -20,21 +20,16 @@ export 'src/listener/group_listener.dart';
|
||||
export 'src/listener/listener_for_service.dart';
|
||||
export 'src/listener/message_kv_info_listener.dart';
|
||||
export 'src/listener/msg_send_progress_listener.dart';
|
||||
export 'src/listener/organization_listener.dart';
|
||||
export 'src/listener/put_file_listener.dart';
|
||||
export 'src/listener/upload_file_listener.dart';
|
||||
export 'src/listener/signaling_listener.dart';
|
||||
export 'src/listener/user_listener.dart';
|
||||
export 'src/listener/workmoments_listener.dart';
|
||||
export 'src/manager/im_conversation_manager.dart';
|
||||
export 'src/manager/im_friendship_manager.dart';
|
||||
export 'src/manager/im_group_manager.dart';
|
||||
export 'src/manager/im_manager.dart';
|
||||
export 'src/manager/im_message_manager.dart';
|
||||
export 'src/manager/im_offline_push_manager.dart';
|
||||
export 'src/manager/im_organization_manager.dart';
|
||||
export 'src/manager/im_signaling_manager.dart';
|
||||
export 'src/manager/im_user_manager.dart';
|
||||
export 'src/manager/im_workmoments_manager.dart';
|
||||
export 'src/models/conversation_info.dart';
|
||||
export 'src/models/group_info.dart';
|
||||
export 'src/models/meeting_info.dart';
|
||||
@ -44,6 +39,5 @@ export 'src/models/organization_info.dart';
|
||||
export 'src/models/search_info.dart';
|
||||
export 'src/models/signaling_info.dart';
|
||||
export 'src/models/user_info.dart';
|
||||
export 'src/models/workmoments_info.dart';
|
||||
export 'src/openim.dart';
|
||||
export 'src/utils.dart';
|
||||
|
@ -14,5 +14,5 @@ class ListenerType {
|
||||
static const customBusinessListener = "customBusinessListener";
|
||||
static const messageKvInfoListener = "messageKvInfoListener";
|
||||
static const listenerForService = "listenerForService";
|
||||
static const putFileListener = "putFileListener";
|
||||
static const uploadFileListener = "uploadFileListener";
|
||||
}
|
||||
|
@ -1,17 +1,172 @@
|
||||
/// 消息发送失败
|
||||
class MessageFailedCode {
|
||||
/// 被对方拉黑
|
||||
static const int blockedByFriend = 1302;
|
||||
// /// 消息发送失败
|
||||
// class MessageFailedCode {
|
||||
// /// 被对方拉黑
|
||||
// static const int blockedByFriend = 1302;
|
||||
//
|
||||
// /// 被对方删除
|
||||
// static const int deletedByFriend = 1303;
|
||||
//
|
||||
// /// 已被移除群聊/群已解散
|
||||
// static const int notInGroup = 1204;
|
||||
// }
|
||||
//
|
||||
// /// 添加好友失败
|
||||
// class AddFriendFailedCode {
|
||||
// /// 该用户已设置不可添加
|
||||
// static const int refuseToAddFriends = 10013;
|
||||
// }
|
||||
|
||||
/// 被对方删除
|
||||
static const int deletedByFriend = 601;
|
||||
class SDKErrorCode {
|
||||
/// 网络请求错误
|
||||
static const int networkRequestError = 10000;
|
||||
|
||||
/// 已被移除群聊/群已解散
|
||||
static const int notInGroup = 1205;
|
||||
}
|
||||
/// 网络等待超时错误
|
||||
static const int networkWaitTimeoutError = 10001;
|
||||
|
||||
/// 参数错误
|
||||
static const int parameterError = 10002;
|
||||
|
||||
/// 上下文超时错误,通常为用户已经退出
|
||||
static const int contextTimeoutError = 10003;
|
||||
|
||||
/// 资源未加载完毕,通常为未初始化,或者登录接口还未成功返回
|
||||
static const int resourceNotLoaded = 10004;
|
||||
|
||||
/// 未知错误,需要根据 errmsg 确认原因
|
||||
static const int unknownError = 10005;
|
||||
|
||||
/// sdk 内部错误,需要根据 errmsg 确认原因
|
||||
static const int sdkInternalError = 10006;
|
||||
|
||||
/// 添加好友失败
|
||||
class AddFriendFailedCode {
|
||||
/// 该用户已设置不可添加
|
||||
static const int refuseToAddFriends = 10013;
|
||||
|
||||
/// 用户不存在或未注册
|
||||
static const int userNotExistOrNotRegistered = 10100;
|
||||
|
||||
/// 用户已经退出登录
|
||||
static const int userHasLoggedOut = 10101;
|
||||
|
||||
/// 用户重复登录,可以通过 getloginstatus 确认登录状态,避免重复登录
|
||||
static const int repeatLogin = 10102;
|
||||
|
||||
/// 需要上传的文件不存在
|
||||
static const int uploadFileNotExist = 10200;
|
||||
|
||||
/// 消息解压失败
|
||||
static const int messageDecompressionFailed = 10201;
|
||||
|
||||
/// 消息解码失败
|
||||
static const int messageDecodingFailed = 10202;
|
||||
|
||||
/// 不支持的长连接二进制协议
|
||||
static const int unsupportedLongConnection = 10203;
|
||||
|
||||
/// 消息重复发送
|
||||
static const int messageRepeated = 10204;
|
||||
|
||||
/// 消息内容类型不支持
|
||||
static const int messageContentTypeNotSupported = 10205;
|
||||
|
||||
/// 不支持的会话操作
|
||||
static const int unsupportedSessionOperation = 10301;
|
||||
|
||||
/// 群 ID 不存在
|
||||
static const int groupIDNotExist = 10400;
|
||||
|
||||
/// 群组类型错误
|
||||
static const int wrongGroupType = 10401;
|
||||
|
||||
/// 服务器内部错误,通常为内部网络错误,需要检查服务器各节点运行是否正常
|
||||
static const int serverInternalError = 500;
|
||||
|
||||
/// 参数错误,需要检查 body 参数以及 header 参数是否正确
|
||||
static const int serverParameterError = 1001;
|
||||
|
||||
/// 权限不足,一般为 header 参数中携带 token 不正确,或者权限越级操作
|
||||
static const int insufficientPermissions = 1002;
|
||||
|
||||
/// 数据库主键重复
|
||||
static const int duplicateDatabasePrimaryKey = 1003;
|
||||
|
||||
/// 数据库记录未找到
|
||||
static const int databaseRecordNotFound = 1004;
|
||||
|
||||
/// 用户 ID 不存在
|
||||
static const int userIDNotExist = 1101;
|
||||
|
||||
/// 用户已经注册
|
||||
static const int userAlreadyRegistered = 1102;
|
||||
|
||||
/// 群不存在
|
||||
static const int groupNotExis = 1201;
|
||||
|
||||
/// 群已存在
|
||||
static const int groupAlreadyExists = 1202;
|
||||
|
||||
/// 用户不在群组中
|
||||
static const int userIsNotInGroup = 1203;
|
||||
|
||||
/// 群组已解散
|
||||
static const int groupDisbanded = 1204;
|
||||
|
||||
/// 群申请已经被处理,不需要重复处理
|
||||
static const int groupApplicationHasBeenProcessed = 1206;
|
||||
|
||||
/// 不能添加自己为好友
|
||||
static const int notAddMyselfAsAFriend = 1301;
|
||||
|
||||
/// 已被对方拉黑
|
||||
static const int hasBeenBlocked = 1302;
|
||||
|
||||
/// 对方不是自己的好友
|
||||
static const int notFriend = 1303;
|
||||
|
||||
/// 已经是好友关系,不需要重复申请
|
||||
static const int alreadyAFriendRelationship = 1304;
|
||||
|
||||
/// 消息已读功能被关闭
|
||||
static const int messageReadFunctionIsTurnedOff = 1401;
|
||||
|
||||
/// 你已被禁言,不能在群里发言
|
||||
static const int youHaveBeenBanned = 1402;
|
||||
|
||||
/// 群已被禁言,不能发言
|
||||
static const int groupHasBeenBanned = 1403;
|
||||
|
||||
/// 该消息已被撤回
|
||||
static const int messageHasBeenRetracted = 1404;
|
||||
|
||||
/// 授权过期
|
||||
static const int licenseExpired = 1405;
|
||||
|
||||
/// token 已经过期
|
||||
static const int tokenHasExpired = 1501;
|
||||
|
||||
/// token 无效
|
||||
static const int tokenInvalid = 1502;
|
||||
|
||||
/// token 格式错误
|
||||
static const int tokenFormatError = 1503;
|
||||
|
||||
/// token 还未生效
|
||||
static const int tokenHasNotYetTakenEffect = 1504;
|
||||
|
||||
/// 未知 token 错误
|
||||
static const int unknownTokenError = 1505;
|
||||
|
||||
/// 被踢出的 token,无效
|
||||
static const int thekickedOutTokenIsInvalid = 1506;
|
||||
|
||||
/// token 不存在
|
||||
static const int tokenNotExist = 1507;
|
||||
|
||||
/// 连接数超过网关最大限制
|
||||
static const int connectionsExceedsMaximumLimit = 1601;
|
||||
|
||||
/// 连接握手参数错误
|
||||
static const int handshakeParameterError = 1602;
|
||||
|
||||
/// 文件上传过期
|
||||
static const int fileUploadExpired = 1701;
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
// /// 组织架构监听
|
||||
// class OnOrganizationListener {
|
||||
// Function()? onOrganizationUpdated;
|
||||
//
|
||||
// OnOrganizationListener({this.onOrganizationUpdated});
|
||||
//
|
||||
// /// 组织架构有更新
|
||||
// void organizationUpdated() {
|
||||
// onOrganizationUpdated?.call();
|
||||
// }
|
||||
// }
|
@ -1,32 +0,0 @@
|
||||
class OnPutFileListener {
|
||||
Function(String putID, String hash, int total)? onHashComplete;
|
||||
Function(String putID, int current, int total)? onHashProgress;
|
||||
Function(String putID, int size)? onOpen;
|
||||
Function(String putID, int total, int putType)? onPutComplete;
|
||||
Function(String putID, int save, int current, int total)? onPutProgress;
|
||||
Function(String putID, int current, int total)? onPutStart;
|
||||
|
||||
void hashComplete(String putID, String hash, int total) {
|
||||
onHashComplete?.call(putID, hash, total);
|
||||
}
|
||||
|
||||
void hashProgress(String putID, int current, int total) {
|
||||
onHashProgress?.call(putID, current, total);
|
||||
}
|
||||
|
||||
void open(String putID, int size) {
|
||||
onOpen?.call(putID, size);
|
||||
}
|
||||
|
||||
void putComplete(String putID, int total, int putType) {
|
||||
onPutComplete?.call(putID, total, putType);
|
||||
}
|
||||
|
||||
void putProgress(String putID, int save, int current, int total) {
|
||||
onPutProgress?.call(putID, save, current, total);
|
||||
}
|
||||
|
||||
void putStart(String putID, int current, int total) {
|
||||
onPutStart?.call(putID, current, total);
|
||||
}
|
||||
}
|
45
lib/src/listener/upload_file_listener.dart
Normal file
45
lib/src/listener/upload_file_listener.dart
Normal file
@ -0,0 +1,45 @@
|
||||
class OnUploadFileListener {
|
||||
Function(String id, int size, String url, int type)? onComplete;
|
||||
Function(String id, String partHash, String fileHash)? onHashPartComplete;
|
||||
Function(String id, int index, int size, String partHash)? onHashPartProgress;
|
||||
Function(String id, int size)? onOpen;
|
||||
Function(String id, int partSize, int num)? onPartSize;
|
||||
Function(String id, int fileSize, int streamSize, int storageSize)?
|
||||
onUploadProgress;
|
||||
Function(String id, String uploadID)? onUploadID;
|
||||
Function(String id, int index, int partSize, String partHash)?
|
||||
onUploadPartComplete;
|
||||
|
||||
void complete(String id, int size, String url, int type) {
|
||||
onComplete?.call(id, size, url, type);
|
||||
}
|
||||
|
||||
void hashPartComplete(String id, String partHash, String fileHash) {
|
||||
onHashPartComplete?.call(id, partHash, fileHash);
|
||||
}
|
||||
|
||||
void hashPartProgress(String id, int index, int size, String partHash) {
|
||||
onHashPartProgress?.call(id, index, size, partHash);
|
||||
}
|
||||
|
||||
void open(String id, int size) {
|
||||
onOpen?.call(id, size);
|
||||
}
|
||||
|
||||
void partSize(String id, int partSize, int num) {
|
||||
onPartSize?.call(id, partSize, num);
|
||||
}
|
||||
|
||||
void uploadProgress(
|
||||
String id, int fileSize, int streamSize, int storageSize) {
|
||||
onUploadProgress?.call(id, fileSize, streamSize, storageSize);
|
||||
}
|
||||
|
||||
void uploadID(String id, String uploadID) {
|
||||
onUploadID?.call(id, uploadID);
|
||||
}
|
||||
|
||||
void uploadPartComplete(String id, int index, int partSize, String partHash) {
|
||||
onUploadPartComplete?.call(id, index, partSize, partHash);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
// /// 朋友圈监听
|
||||
// class OnWorkMomentsListener {
|
||||
// Function()? onRecvNewNotification;
|
||||
//
|
||||
// OnWorkMomentsListener({this.onRecvNewNotification});
|
||||
//
|
||||
// /// 朋友圈信息发送改变
|
||||
// void recvNewNotification() {
|
||||
// onRecvNewNotification?.call();
|
||||
// }
|
||||
// }
|
@ -304,6 +304,36 @@ class ConversationManager {
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 开启定期删除
|
||||
/// [isMsgDestruct] true 开启
|
||||
Future<dynamic> setConversationIsMsgDestruct({
|
||||
required String conversationID,
|
||||
bool isMsgDestruct = true,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'setConversationIsMsgDestruct',
|
||||
_buildParam({
|
||||
"conversationID": conversationID,
|
||||
"isMsgDestruct": isMsgDestruct,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 定期删除聊天记录
|
||||
/// [duration] 秒
|
||||
Future<dynamic> setConversationMsgDestructTime({
|
||||
required String conversationID,
|
||||
int duration = 1 * 24 * 60 * 60,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'setConversationMsgDestructTime',
|
||||
_buildParam({
|
||||
"conversationID": conversationID,
|
||||
"duration": duration,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 会话列表自定义排序规则。
|
||||
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
||||
..sort((a, b) {
|
||||
|
@ -12,16 +12,11 @@ class IMManager {
|
||||
late MessageManager messageManager;
|
||||
late GroupManager groupManager;
|
||||
late UserManager userManager;
|
||||
|
||||
// late OfflinePushManager offlinePushManager;
|
||||
late SignalingManager signalingManager;
|
||||
|
||||
// late WorkMomentsManager workMomentsManager;
|
||||
// late OrganizationManager organizationManager;
|
||||
|
||||
late OnConnectListener _connectListener;
|
||||
OnListenerForService? _listenerForService;
|
||||
OnPutFileListener? _putFileListener;
|
||||
OnUploadFileListener? _uploadFileListener;
|
||||
late String userID;
|
||||
late UserInfo userInfo;
|
||||
bool isLogined = false;
|
||||
@ -34,10 +29,7 @@ class IMManager {
|
||||
messageManager = MessageManager(_channel);
|
||||
groupManager = GroupManager(_channel);
|
||||
userManager = UserManager(_channel);
|
||||
// offlinePushManager = OfflinePushManager(_channel);
|
||||
signalingManager = SignalingManager(_channel);
|
||||
// workMomentsManager = WorkMomentsManager(_channel);
|
||||
// organizationManager = OrganizationManager(_channel);
|
||||
_addNativeCallback(_channel);
|
||||
}
|
||||
|
||||
@ -336,23 +328,7 @@ class IMManager {
|
||||
signalingManager.listener.receiveCustomSignal(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*else if (call.method == ListenerType.workMomentsListener) {
|
||||
String type = call.arguments['type'];
|
||||
switch (type) {
|
||||
case 'OnRecvNewNotification':
|
||||
workMomentsManager.listener.recvNewNotification();
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.organizationListener) {
|
||||
String type = call.arguments['type'];
|
||||
switch (type) {
|
||||
case 'onOrganizationUpdated':
|
||||
organizationManager.listener.organizationUpdated();
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
else if (call.method == ListenerType.customBusinessListener) {
|
||||
} else if (call.method == ListenerType.customBusinessListener) {
|
||||
String type = call.arguments['type'];
|
||||
String data = call.arguments['data'];
|
||||
switch (type) {
|
||||
@ -400,45 +376,61 @@ class IMManager {
|
||||
_listenerForService?.recvNewMessage(msg);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.putFileListener) {
|
||||
} else if (call.method == ListenerType.uploadFileListener) {
|
||||
String type = call.arguments['type'];
|
||||
dynamic data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'hashComplete':
|
||||
String putID = data['putID'];
|
||||
String hash = data['hash'];
|
||||
int total = data['total'];
|
||||
_putFileListener?.hashComplete(putID, hash, total);
|
||||
case 'complete':
|
||||
String id = data['id'];
|
||||
int size = data['size'];
|
||||
String url = data['url'];
|
||||
int type = data['type'];
|
||||
_uploadFileListener?.complete(id, size, url, type);
|
||||
break;
|
||||
case 'hashProgress':
|
||||
String putID = data['putID'];
|
||||
int current = data['current'];
|
||||
int total = data['total'];
|
||||
_putFileListener?.hashProgress(putID, current, total);
|
||||
case 'hashPartComplete':
|
||||
String id = data['id'];
|
||||
String partHash = data['partHash'];
|
||||
String fileHash = data['fileHash'];
|
||||
_uploadFileListener?.hashPartComplete(id, partHash, fileHash);
|
||||
break;
|
||||
case 'hashPartProgress':
|
||||
String id = data['id'];
|
||||
int index = data['index'];
|
||||
int size = data['size'];
|
||||
String partHash = data['partHash'];
|
||||
_uploadFileListener?.hashPartProgress(id, index, size, partHash);
|
||||
break;
|
||||
case 'open':
|
||||
String putID = data['putID'];
|
||||
String id = data['id'];
|
||||
int size = data['size'];
|
||||
_putFileListener?.open(putID, size);
|
||||
_uploadFileListener?.open(id, size);
|
||||
break;
|
||||
case 'putComplete':
|
||||
String putID = data['putID'];
|
||||
int putType = data['putType'];
|
||||
int total = data['total'];
|
||||
_putFileListener?.putComplete(putID, putType, total);
|
||||
case 'partSize':
|
||||
String id = data['id'];
|
||||
int partSize = data['partSize'];
|
||||
int num = data['num'];
|
||||
_uploadFileListener?.partSize(id, partSize, num);
|
||||
break;
|
||||
case 'putProgress':
|
||||
String putID = data['putID'];
|
||||
int save = data['save'];
|
||||
int current = data['current'];
|
||||
int total = data['total'];
|
||||
_putFileListener?.putProgress(putID, save, current, total);
|
||||
case 'uploadProgress':
|
||||
String id = data['id'];
|
||||
int fileSize = data['fileSize'];
|
||||
int streamSize = data['streamSize'];
|
||||
int storageSize = data['storageSize'];
|
||||
_uploadFileListener?.uploadProgress(
|
||||
id, fileSize, streamSize, storageSize);
|
||||
break;
|
||||
case 'putStart':
|
||||
String putID = data['putID'];
|
||||
int current = data['current'];
|
||||
int total = data['total'];
|
||||
_putFileListener?.putStart(putID, current, total);
|
||||
case 'uploadID':
|
||||
String id = data['id'];
|
||||
String uploadID = data['uploadID'];
|
||||
_uploadFileListener?.uploadID(id, uploadID);
|
||||
break;
|
||||
case 'uploadPartComplete':
|
||||
String id = data['id'];
|
||||
int index = data['index'];
|
||||
int partSize = data['partSize'];
|
||||
String partHash = data['partHash'];
|
||||
_uploadFileListener?.uploadPartComplete(
|
||||
id, index, partSize, partHash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -467,10 +459,10 @@ class IMManager {
|
||||
required OnConnectListener listener,
|
||||
int logLevel = 6,
|
||||
String objectStorage = 'cos',
|
||||
// String? encryptionKey,
|
||||
// bool isNeedEncryption = false,
|
||||
// bool isCompression = false,
|
||||
// bool isExternalExtensions = false,
|
||||
String? encryptionKey,
|
||||
bool isNeedEncryption = false,
|
||||
bool isCompression = false,
|
||||
bool isExternalExtensions = false,
|
||||
bool isLogStandardOutput = true,
|
||||
String? logFilePath,
|
||||
String? operationID,
|
||||
@ -487,10 +479,10 @@ class IMManager {
|
||||
"dataDir": dataDir,
|
||||
"logLevel": logLevel,
|
||||
"objectStorage": objectStorage,
|
||||
// "encryptionKey": encryptionKey,
|
||||
// "isNeedEncryption": isNeedEncryption,
|
||||
// "isCompression": isCompression,
|
||||
// "isExternalExtensions": isExternalExtensions,
|
||||
"encryptionKey": encryptionKey,
|
||||
"isNeedEncryption": isNeedEncryption,
|
||||
"isCompression": isCompression,
|
||||
"isExternalExtensions": isExternalExtensions,
|
||||
"isLogStandardOutput": isLogStandardOutput,
|
||||
"logFilePath": logFilePath,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
@ -553,8 +545,14 @@ class IMManager {
|
||||
|
||||
/// 获取登录状态
|
||||
/// 1: logout 2: logging 3:logged
|
||||
Future<int?> getLoginStatus() =>
|
||||
_channel.invokeMethod<int>('getLoginStatus', _buildParam({}));
|
||||
Future<int?> getLoginStatus({
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod<int>(
|
||||
'getLoginStatus',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 获取当前登录用户id
|
||||
Future<String> getLoginUserID() async => userID;
|
||||
@ -562,19 +560,23 @@ class IMManager {
|
||||
/// 获取当前登录用户信息
|
||||
Future<UserInfo> getLoginUserInfo() async => userInfo;
|
||||
|
||||
///
|
||||
Future putFile({
|
||||
required String putID,
|
||||
///[id] 跟 [OnUploadFileListener] id一致,区分是哪个文件的回调
|
||||
Future uploadFile({
|
||||
required String id,
|
||||
required String filePath,
|
||||
required String fileName,
|
||||
String? contentType,
|
||||
String? cause,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'putFile',
|
||||
'uploadFile',
|
||||
_buildParam({
|
||||
'putID': putID,
|
||||
'id': id,
|
||||
'filePath': filePath,
|
||||
'name': fileName,
|
||||
'contentType': contentType,
|
||||
'cause': cause,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
@ -613,8 +615,8 @@ class IMManager {
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }));
|
||||
|
||||
void setPutFileListener(OnPutFileListener listener) {
|
||||
_putFileListener = listener;
|
||||
void setUploadFileListener(OnUploadFileListener listener) {
|
||||
_uploadFileListener = listener;
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -1,7 +0,0 @@
|
||||
// import 'package:flutter/services.dart';
|
||||
//
|
||||
// class OfflinePushManager{
|
||||
// MethodChannel _channel;
|
||||
//
|
||||
// OfflinePushManager(this._channel);
|
||||
// }
|
@ -1,162 +0,0 @@
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
//
|
||||
// class OrganizationManager {
|
||||
// MethodChannel _channel;
|
||||
// late OnOrganizationListener listener;
|
||||
//
|
||||
// OrganizationManager(this._channel);
|
||||
//
|
||||
// /// 组织架构发生变化回调
|
||||
// Future setOrganizationListener(OnOrganizationListener listener) {
|
||||
// this.listener = listener;
|
||||
// return _channel.invokeMethod('setOrganizationListener', _buildParam({}));
|
||||
// }
|
||||
//
|
||||
// /// 获取子部门列表,返回当前部门下的一级子部门
|
||||
// /// [departmentID] 当前部门id
|
||||
// /// [offset] 开始下标
|
||||
// /// [count] 每页大小
|
||||
// Future<List<DeptInfo>> getSubDept({
|
||||
// required String departmentID,
|
||||
// int offset = 0,
|
||||
// int count = 40,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getSubDepartment',
|
||||
// _buildParam({
|
||||
// 'departmentID': departmentID,
|
||||
// 'offset': offset,
|
||||
// 'count': count,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) => Utils.toList(value, (v) => DeptInfo.fromJson(v)));
|
||||
//
|
||||
// /// 获取部门下的成员列表,返回当前部门下的一级成员
|
||||
// /// [departmentID] 当前部门id
|
||||
// /// [offset] 开始下标
|
||||
// /// [count] 每页大小
|
||||
// Future<List<DeptMemberInfo>> getDeptMember({
|
||||
// required String departmentID,
|
||||
// int offset = 0,
|
||||
// int count = 40,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getDepartmentMember',
|
||||
// _buildParam({
|
||||
// 'departmentID': departmentID,
|
||||
// 'offset': offset,
|
||||
// 'count': count,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) =>
|
||||
// Utils.toList(value, (v) => DeptMemberInfo.fromJson(v)));
|
||||
//
|
||||
// /// 获取成员所在的部门
|
||||
// /// [userID] 成员ID
|
||||
// Future<List<UserInDept>> getUserInDept({
|
||||
// required String userID,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getUserInDepartment',
|
||||
// _buildParam({
|
||||
// 'userID': userID,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) => Utils.toList(value, (v) => UserInDept.fromJson(v)));
|
||||
//
|
||||
// /// 获取部门下的子部门跟员工
|
||||
// /// [departmentID] 当前部门id
|
||||
// Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({
|
||||
// required String departmentID,
|
||||
// // int departmentOffset = 0,
|
||||
// // int departmentCount = 40,
|
||||
// // int memberOffset = 0,
|
||||
// // int memberCount = 40,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getDepartmentMemberAndSubDepartment',
|
||||
// _buildParam({
|
||||
// 'departmentID': departmentID,
|
||||
// // 'departmentOffset': departmentOffset,
|
||||
// // 'departmentCount': departmentCount,
|
||||
// // 'memberOffset': memberOffset,
|
||||
// // 'memberCount': memberCount,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) =>
|
||||
// Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
|
||||
//
|
||||
// /// 查询部门信息
|
||||
// /// [departmentID] 部门ID
|
||||
// Future<DeptInfo> getDeptInfo({
|
||||
// required String departmentID,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getDepartmentInfo',
|
||||
// _buildParam({
|
||||
// 'departmentID': departmentID,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) => Utils.toObj(value, (v) => DeptInfo.fromJson(v)));
|
||||
//
|
||||
// /// 搜索组织人员
|
||||
// /// [keyWord] 关键字
|
||||
// /// [isSearchUserName] 是否匹配用户名
|
||||
// /// [isSearchEnglishName] 是否匹配英文名
|
||||
// /// [isSearchPosition] 是否匹配职位
|
||||
// /// [isSearchUserID] 是否匹配用户ID
|
||||
// /// [isSearchMobile] 是否匹配手机号
|
||||
// /// [isSearchEmail] 是否匹配邮箱号
|
||||
// /// [isSearchTelephone] 是否匹配电话号码
|
||||
// /// [offset] 开始下标
|
||||
// /// [count] 分页大小
|
||||
// Future<OrganizationSearchResult> searchOrganization({
|
||||
// required String keyWord,
|
||||
// bool isSearchUserName = false,
|
||||
// bool isSearchEnglishName = false,
|
||||
// bool isSearchPosition = false,
|
||||
// bool isSearchUserID = false,
|
||||
// bool isSearchMobile = false,
|
||||
// bool isSearchEmail = false,
|
||||
// bool isSearchTelephone = false,
|
||||
// int offset = 0,
|
||||
// int count = 40,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'searchOrganization',
|
||||
// _buildParam({
|
||||
// 'searchParam': {
|
||||
// 'keyWord': keyWord,
|
||||
// 'isSearchUserName': isSearchUserName,
|
||||
// 'isSearchEnglishName': isSearchEnglishName,
|
||||
// 'isSearchPosition': isSearchPosition,
|
||||
// 'isSearchUserID': isSearchUserID,
|
||||
// 'isSearchMobile': isSearchMobile,
|
||||
// 'isSearchEmail': isSearchEmail,
|
||||
// 'isSearchTelephone': isSearchTelephone,
|
||||
// },
|
||||
// 'offset': offset,
|
||||
// 'count': count,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) =>
|
||||
// Utils.toObj(value, (v) => OrganizationSearchResult.fromJson(v)));
|
||||
//
|
||||
// static Map _buildParam(Map param) {
|
||||
// param["ManagerName"] = "organizationManager";
|
||||
// return param;
|
||||
// }
|
||||
// }
|
@ -209,11 +209,11 @@ class SignalingManager {
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 加入会议室
|
||||
/// [meetingID] 会议ID
|
||||
/// [roomID] 会议ID
|
||||
/// [meetingName] 会议主题
|
||||
/// [participantNickname] 加入房间显示的名称
|
||||
Future<SignalingCertificate> signalingJoinMeeting({
|
||||
required String meetingID,
|
||||
required String roomID,
|
||||
String? meetingName,
|
||||
String? participantNickname,
|
||||
String? operationID,
|
||||
@ -223,7 +223,7 @@ class SignalingManager {
|
||||
'signalingJoinMeeting',
|
||||
_buildParam({
|
||||
'info': {
|
||||
'meetingID': meetingID,
|
||||
'roomID': roomID,
|
||||
'meetingName': meetingName,
|
||||
'participantNickname': participantNickname,
|
||||
},
|
||||
@ -300,6 +300,18 @@ class SignalingManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
Future<SignalingInfo> getSignalingInvitationInfoStartApp({
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'getSignalingInvitationInfoStartApp',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingInfo.fromJson(map)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "signalingManager";
|
||||
return param;
|
||||
|
@ -1,61 +0,0 @@
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
//
|
||||
// class WorkMomentsManager {
|
||||
// MethodChannel _channel;
|
||||
// late OnWorkMomentsListener listener;
|
||||
//
|
||||
// WorkMomentsManager(this._channel);
|
||||
//
|
||||
// /// 朋友圈信息发送变化通知
|
||||
// Future setWorkMomentsListener(OnWorkMomentsListener listener) {
|
||||
// this.listener = listener;
|
||||
// return _channel.invokeMethod('setWorkMomentsListener', _buildParam({}));
|
||||
// }
|
||||
//
|
||||
// /// 获取朋友圈未读消息总数
|
||||
// Future<int> getWorkMomentsUnReadCount({
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getWorkMomentsUnReadCount',
|
||||
// _buildParam({
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) => Utils.toObj(value, (map) => map['unreadCount']));
|
||||
//
|
||||
// /// 获取通知列表
|
||||
// /// [offset] 开始下标
|
||||
// /// [count] 每页大小
|
||||
// Future<List<WorkMomentsInfo>> getWorkMomentsNotification({
|
||||
// required int offset,
|
||||
// required int count,
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel
|
||||
// .invokeMethod(
|
||||
// 'getWorkMomentsNotification',
|
||||
// _buildParam({
|
||||
// 'offset': offset,
|
||||
// 'count': count,
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }))
|
||||
// .then((value) =>
|
||||
// Utils.toList(value, (map) => WorkMomentsInfo.fromJson(map)));
|
||||
//
|
||||
// /// 清除通知列表
|
||||
// Future clearWorkMomentsNotification({
|
||||
// String? operationID,
|
||||
// }) =>
|
||||
// _channel.invokeMethod(
|
||||
// 'clearWorkMomentsNotification',
|
||||
// _buildParam({
|
||||
// 'operationID': Utils.checkOperationID(operationID),
|
||||
// }));
|
||||
//
|
||||
// static Map _buildParam(Map param) {
|
||||
// param["ManagerName"] = "workMomentsManager";
|
||||
// return param;
|
||||
// }
|
||||
// }
|
@ -51,8 +51,11 @@ class ConversationInfo {
|
||||
/// 可阅读期限 s
|
||||
int? burnDuration;
|
||||
|
||||
/// 附加内容
|
||||
String? ext;
|
||||
/// 是否开启定期销毁
|
||||
bool? isMsgDestruct;
|
||||
|
||||
/// 定期销毁时间 s
|
||||
int? msgDestructTime;
|
||||
|
||||
/// 附加内容
|
||||
String? ex;
|
||||
@ -78,7 +81,9 @@ class ConversationInfo {
|
||||
this.isPinned,
|
||||
this.isNotInGroup,
|
||||
this.ex,
|
||||
this.ext,
|
||||
this.groupAtType,
|
||||
this.isMsgDestruct,
|
||||
this.msgDestructTime,
|
||||
});
|
||||
|
||||
ConversationInfo.fromJson(Map<String, dynamic> json)
|
||||
@ -106,7 +111,8 @@ class ConversationInfo {
|
||||
isNotInGroup = json['isNotInGroup'];
|
||||
groupAtType = json['groupAtType'];
|
||||
ex = json['ex'];
|
||||
ext = json['ext'];
|
||||
isMsgDestruct = json['isMsgDestruct'];
|
||||
msgDestructTime = json['msgDestructTime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@ -129,7 +135,8 @@ class ConversationInfo {
|
||||
data['isNotInGroup'] = this.isNotInGroup;
|
||||
data['groupAtType'] = this.groupAtType;
|
||||
data['ex'] = this.ex;
|
||||
data['ext'] = this.ext;
|
||||
data['isMsgDestruct'] = this.isMsgDestruct;
|
||||
data['msgDestructTime'] = this.msgDestructTime;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class MeetingInfoList {
|
||||
}
|
||||
|
||||
class MeetingInfo {
|
||||
String? meetingID;
|
||||
String? roomID;
|
||||
String? meetingName;
|
||||
String? ex;
|
||||
String? hostUserID;
|
||||
@ -46,7 +46,7 @@ class MeetingInfo {
|
||||
List<String>? beWatchedUserIDList; // 正在被观看用户列表
|
||||
|
||||
MeetingInfo({
|
||||
this.meetingID,
|
||||
this.roomID,
|
||||
this.meetingName,
|
||||
this.ex,
|
||||
this.hostUserID,
|
||||
@ -70,7 +70,7 @@ class MeetingInfo {
|
||||
});
|
||||
|
||||
MeetingInfo.fromJson(Map<String, dynamic> json) {
|
||||
meetingID = json['meetingID'];
|
||||
roomID = json['roomID'];
|
||||
meetingName = json['meetingName'];
|
||||
ex = json['ex'];
|
||||
hostUserID = json['hostUserID'];
|
||||
@ -107,7 +107,7 @@ class MeetingInfo {
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['meetingID'] = meetingID;
|
||||
data['roomID'] = roomID;
|
||||
data['meetingName'] = meetingName;
|
||||
data['ex'] = ex;
|
||||
data['hostUserID'] = hostUserID;
|
||||
@ -133,21 +133,21 @@ class MeetingInfo {
|
||||
}
|
||||
|
||||
class MeetingStreamEvent {
|
||||
String? meetingID;
|
||||
String? roomID;
|
||||
String? streamType;
|
||||
bool? mute;
|
||||
|
||||
MeetingStreamEvent({this.meetingID, this.streamType, this.mute});
|
||||
MeetingStreamEvent({this.roomID, this.streamType, this.mute});
|
||||
|
||||
MeetingStreamEvent.fromJson(Map<String, dynamic> json) {
|
||||
meetingID = json['meetingID'];
|
||||
roomID = json['roomID'];
|
||||
streamType = json['streamType'];
|
||||
mute = json['mute'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['meetingID'] = this.meetingID;
|
||||
data['roomID'] = this.roomID;
|
||||
data['streamType'] = this.streamType;
|
||||
data['mute'] = this.mute;
|
||||
return data;
|
||||
|
@ -4,7 +4,7 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class SignalingInfo {
|
||||
/// 操作者
|
||||
String? opUserID;
|
||||
String? userID;
|
||||
|
||||
/// 邀请信息
|
||||
InvitationInfo? invitation;
|
||||
@ -13,24 +13,24 @@ class SignalingInfo {
|
||||
OfflinePushInfo? offlinePushInfo;
|
||||
|
||||
SignalingInfo({
|
||||
this.opUserID,
|
||||
this.userID,
|
||||
this.invitation,
|
||||
this.offlinePushInfo,
|
||||
});
|
||||
|
||||
SignalingInfo.fromJson(Map<String, dynamic> json) {
|
||||
opUserID = json['opUserID'];
|
||||
invitation = json['invitation'] == null
|
||||
? null
|
||||
: InvitationInfo.fromJson(json['invitation']);
|
||||
offlinePushInfo = json['offlinePushInfo'] == null
|
||||
? null
|
||||
: OfflinePushInfo.fromJson(json['offlinePushInfo']);
|
||||
userID = json['userID'] ?? invitation?.inviterUserID;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['opUserID'] = this.opUserID;
|
||||
data['userID'] = this.userID;
|
||||
data['invitation'] = this.invitation?.toJson();
|
||||
data['offlinePushInfo'] = this.offlinePushInfo?.toJson();
|
||||
return data;
|
||||
@ -78,7 +78,7 @@ class InvitationInfo {
|
||||
|
||||
InvitationInfo.fromJson(Map<String, dynamic> json) {
|
||||
inviterUserID = json['inviterUserID'];
|
||||
inviteeUserIDList = json['inviteeUserIDList'].cast<String>();
|
||||
inviteeUserIDList = json['inviteeUserIDList']?.cast<String>();
|
||||
groupID = json['groupID'];
|
||||
roomID = json['roomID'];
|
||||
timeout = json['timeout'];
|
||||
|
@ -1,56 +0,0 @@
|
||||
// class WorkMomentsInfo {
|
||||
// int? notificationMsgType;
|
||||
// String? replyUserName;
|
||||
// String? replyUserID;
|
||||
// String? content;
|
||||
// String? contentID;
|
||||
// String? workMomentID;
|
||||
// String? userID;
|
||||
// String? userName;
|
||||
// String? faceURL;
|
||||
// String? workMomentContent;
|
||||
// int? createTime;
|
||||
//
|
||||
// WorkMomentsInfo(
|
||||
// {this.notificationMsgType,
|
||||
// this.replyUserName,
|
||||
// this.replyUserID,
|
||||
// this.content,
|
||||
// this.contentID,
|
||||
// this.workMomentID,
|
||||
// this.userID,
|
||||
// this.userName,
|
||||
// this.faceURL,
|
||||
// this.workMomentContent,
|
||||
// this.createTime});
|
||||
//
|
||||
// WorkMomentsInfo.fromJson(Map<String, dynamic> json) {
|
||||
// notificationMsgType = json['notificationMsgType'];
|
||||
// replyUserName = json['replyUserName'];
|
||||
// replyUserID = json['replyUserID'];
|
||||
// content = json['content'];
|
||||
// contentID = json['contentID'];
|
||||
// workMomentID = json['workMomentID'];
|
||||
// userID = json['userID'];
|
||||
// userName = json['userName'];
|
||||
// faceURL = json['faceURL'];
|
||||
// workMomentContent = json['workMomentContent'];
|
||||
// createTime = json['createTime'];
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
// data['notificationMsgType'] = this.notificationMsgType;
|
||||
// data['replyUserName'] = this.replyUserName;
|
||||
// data['replyUserID'] = this.replyUserID;
|
||||
// data['content'] = this.content;
|
||||
// data['contentID'] = this.contentID;
|
||||
// data['workMomentID'] = this.workMomentID;
|
||||
// data['userID'] = this.userID;
|
||||
// data['userName'] = this.userName;
|
||||
// data['faceURL'] = this.faceURL;
|
||||
// data['workMomentContent'] = this.workMomentContent;
|
||||
// data['createTime'] = this.createTime;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
@ -2,7 +2,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class OpenIM {
|
||||
static const version = '3.0.0';
|
||||
static const version = '3.1.0';
|
||||
|
||||
static const _channel = const MethodChannel('flutter_openim_sdk');
|
||||
|
||||
|
36
pubspec.lock
36
pubspec.lock
@ -6,7 +6,7 @@ packages:
|
||||
description:
|
||||
name: async
|
||||
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.10.0"
|
||||
boolean_selector:
|
||||
@ -14,7 +14,7 @@ packages:
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
characters:
|
||||
@ -22,7 +22,7 @@ packages:
|
||||
description:
|
||||
name: characters
|
||||
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
clock:
|
||||
@ -30,7 +30,7 @@ packages:
|
||||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
@ -38,7 +38,7 @@ packages:
|
||||
description:
|
||||
name: collection
|
||||
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.17.0"
|
||||
fake_async:
|
||||
@ -46,7 +46,7 @@ packages:
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
@ -64,7 +64,7 @@ packages:
|
||||
description:
|
||||
name: js
|
||||
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.6.5"
|
||||
matcher:
|
||||
@ -72,7 +72,7 @@ packages:
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.13"
|
||||
material_color_utilities:
|
||||
@ -80,7 +80,7 @@ packages:
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
meta:
|
||||
@ -88,7 +88,7 @@ packages:
|
||||
description:
|
||||
name: meta
|
||||
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
path:
|
||||
@ -96,7 +96,7 @@ packages:
|
||||
description:
|
||||
name: path
|
||||
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
sky_engine:
|
||||
@ -109,7 +109,7 @@ packages:
|
||||
description:
|
||||
name: source_span
|
||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
stack_trace:
|
||||
@ -117,7 +117,7 @@ packages:
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
stream_channel:
|
||||
@ -125,7 +125,7 @@ packages:
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
string_scanner:
|
||||
@ -133,7 +133,7 @@ packages:
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
@ -141,7 +141,7 @@ packages:
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
@ -149,7 +149,7 @@ packages:
|
||||
description:
|
||||
name: test_api
|
||||
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.4.16"
|
||||
vector_math:
|
||||
@ -157,7 +157,7 @@ packages:
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
sdks:
|
||||
|
Loading…
x
Reference in New Issue
Block a user