init
This commit is contained in:
parent
b8ebc36d29
commit
631230a1df
@ -45,7 +45,7 @@ public class CommonUtil {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func getJsonUid(methodCall: FlutterMethodCall)->String{
|
public static func getJsonUid(methodCall: FlutterMethodCall)->String{
|
||||||
let result = getParamValue(methodCall: methodCall, param: KEY_UID) as AnyObject
|
let result = getParamValue(methodCall: methodCall, param: KEY_UID) as AnyObject
|
||||||
let r = JsonUtil.toString(object: result)
|
let r = JsonUtil.toString(object: result)
|
||||||
return r
|
return r
|
||||||
@ -61,8 +61,7 @@ public class CommonUtil {
|
|||||||
let r = JsonUtil.toString(object: result)
|
let r = JsonUtil.toString(object: result)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static func getMessageText(methodCall: FlutterMethodCall)->String{
|
public static func getMessageText(methodCall: FlutterMethodCall)->String{
|
||||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_TEXT) as! String
|
let result: String = getParamValue(methodCall: methodCall, param: KEY_TEXT) as! String
|
||||||
return result
|
return result
|
||||||
@ -267,56 +266,55 @@ public class CommonUtil {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//login
|
//login
|
||||||
private static let KEY_UID: String = "uid";
|
private static let KEY_UID: String = "uid";
|
||||||
private static let KEY_TOKEN: String = "token";
|
private static let KEY_TOKEN: String = "token";
|
||||||
//create message body
|
//create message body
|
||||||
private static let KEY_TEXT: String = "text";
|
private static let KEY_TEXT: String = "text";
|
||||||
private static let KEY_AT_USER_LIST: String = "atUserList";
|
private static let KEY_AT_USER_LIST: String = "atUserList";
|
||||||
private static let KEY_IMAGE_PATH: String = "imagePath";
|
private static let KEY_IMAGE_PATH: String = "imagePath";
|
||||||
private static let KEY_SOUND_PATH : String= "soundPath";
|
private static let KEY_SOUND_PATH: String= "soundPath";
|
||||||
private static let KEY_SOUND_DURATION: String = "duration";
|
private static let KEY_SOUND_DURATION: String = "duration";
|
||||||
private static let KEY_VIDEO_PATH: String = "videoPath";
|
private static let KEY_VIDEO_PATH: String = "videoPath";
|
||||||
private static let KEY_VIDEO_TYPE: String = "videoType";
|
private static let KEY_VIDEO_TYPE: String = "videoType";
|
||||||
private static let KEY_VIDEO_DURATION: String = "duration";
|
private static let KEY_VIDEO_DURATION: String = "duration";
|
||||||
private static let KEY_VIDEO_SNAPSHOT_PATH: String = "snapshotPath";
|
private static let KEY_VIDEO_SNAPSHOT_PATH: String = "snapshotPath";
|
||||||
private static let KEY_FILE_PATH: String = "filePath";
|
private static let KEY_FILE_PATH: String = "filePath";
|
||||||
private static let KEY_FILE_NAME: String = "fileName";
|
private static let KEY_FILE_NAME: String = "fileName";
|
||||||
private static let KEY_MERGER_MESSAGE_LIST: String = "messageList";
|
private static let KEY_MERGER_MESSAGE_LIST: String = "messageList";
|
||||||
private static let KEY_MERGER_MESSAGE_TITLE: String = "title";
|
private static let KEY_MERGER_MESSAGE_TITLE: String = "title";
|
||||||
private static let KEY_SUMMARY_LIST =: String "summaryList";
|
private static let KEY_SUMMARY_LIST: String = "summaryList";
|
||||||
private static let KEY_FORWARD_MESSAGE: String = "message";
|
private static let KEY_FORWARD_MESSAGE: String = "message";
|
||||||
//send message
|
//send message
|
||||||
private static let KEY_SEND_MESSAGE_CONTENT: String = "message";
|
private static let KEY_SEND_MESSAGE_CONTENT: String = "message";
|
||||||
private static let KEY_SEND_MESSAGE_CONTENT_CLIENT_ID: String = "clientMsgID";
|
private static let KEY_SEND_MESSAGE_CONTENT_CLIENT_ID: String = "clientMsgID";
|
||||||
private static let KEY_SEND_MESSAGE_RECEIVER: String = "receiver";
|
private static let KEY_SEND_MESSAGE_RECEIVER: String = "receiver";
|
||||||
private static let KEY_SEND_MESSAGE_GROUP_ID: String = "groupID";
|
private static let KEY_SEND_MESSAGE_GROUP_ID: String = "groupID";
|
||||||
private static let KEY_SEND_MESSAGE_ONLINE_ONLY: String = "onlineUserOnly";
|
private static let KEY_SEND_MESSAGE_ONLINE_ONLY: String = "onlineUserOnly";
|
||||||
//single chat
|
//single chat
|
||||||
private static let KEY_SINGLE_MESSAGE_CONTENT: String = "message";
|
private static let KEY_SINGLE_MESSAGE_CONTENT: String = "message";
|
||||||
private static let KEY_SINGLE_MESSAGE_USERID: String = "userID";
|
private static let KEY_SINGLE_MESSAGE_USERID: String = "userID";
|
||||||
private static let KEY_SINGLE_MESSAGE_SENDER: String = "sender";
|
private static let KEY_SINGLE_MESSAGE_SENDER: String = "sender";
|
||||||
//group chat
|
//group chat
|
||||||
private static let KEY_GROUP_MESSAGE_GROUPID: String = "groupID";
|
private static let KEY_GROUP_MESSAGE_GROUPID: String = "groupID";
|
||||||
// find message
|
// find message
|
||||||
private static let KEY_FIND_MESSAGE_IDS: String = "messageIDList";
|
private static let KEY_FIND_MESSAGE_IDS: String = "messageIDList";
|
||||||
// conversation
|
// conversation
|
||||||
private static let KEY_CONVERSATION_ID: String = "conversationID";
|
private static let KEY_CONVERSATION_ID: String = "conversationID";
|
||||||
private static let KEY_CONVERSATION_IDS: String = "conversationIDList";
|
private static let KEY_CONVERSATION_IDS: String = "conversationIDList";
|
||||||
private static let KEY_CONVERSATION_DRAFT: String = "draftText";
|
private static let KEY_CONVERSATION_DRAFT: String = "draftText";
|
||||||
private static let KEY_CONVERSATION_PINNED: String = "isPinned";
|
private static let KEY_CONVERSATION_PINNED: String = "isPinned";
|
||||||
private static let KEY_CONVERSATION_SOURCE_ID: String = "sourceID";
|
private static let KEY_CONVERSATION_SOURCE_ID: String = "sourceID";
|
||||||
private static let KEY_CONVERSATION_SESSION_TYPE: String = "sessionType";
|
private static let KEY_CONVERSATION_SESSION_TYPE: String = "sessionType";
|
||||||
// user info
|
// user info
|
||||||
private static let KEY_USER_IDS: String = "uidList";
|
private static let KEY_USER_IDS: String = "uidList";
|
||||||
// group
|
// group
|
||||||
private static let KEY_GROUP_ID: String = "gid";
|
private static let KEY_GROUP_ID: String = "gid";
|
||||||
private static let KEY_GROUP_IDS: String = "gidList";
|
private static let KEY_GROUP_IDS: String = "gidList";
|
||||||
private static let KEY_GROUP_OP_REASON: String = "reason";
|
private static let KEY_GROUP_OP_REASON: String = "reason";
|
||||||
private static let KEY_GROUP_LIST_FILTER: String = "filter";
|
private static let KEY_GROUP_LIST_FILTER: String = "filter";
|
||||||
private static let KEY_GROUP_LIST_NEXT: String = "next";
|
private static let KEY_GROUP_LIST_NEXT: String = "next";
|
||||||
private static let KEY_GROUP_INFO: String = "gInfo";
|
private static let KEY_GROUP_INFO: String = "gInfo";
|
||||||
private static let KEY_GROUP_MEMBER_ROLE_LIST: String = "memberList";
|
private static let KEY_GROUP_MEMBER_ROLE_LIST: String = "memberList";
|
||||||
private static let KEY_GROUP_APPLICATION_INFO: String = "application";
|
private static let KEY_GROUP_APPLICATION_INFO: String = "application";
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,9 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
|||||||
|
|
||||||
private func handleGroupManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
private func handleGroupManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let method: String = call.method
|
let method: String = call.method
|
||||||
if method == "inviteUserToGroup" {
|
if method == "setGroupListener" {
|
||||||
|
groupManager.setGroupListener(methodCall: call, result: result)
|
||||||
|
}else if method == "inviteUserToGroup" {
|
||||||
groupManager.inviteUserToGroup(methodCall: call, result: result)
|
groupManager.inviteUserToGroup(methodCall: call, result: result)
|
||||||
}else if method == "kickGroupMember" {
|
}else if method == "kickGroupMember" {
|
||||||
groupManager.kickGroupMember(methodCall: call, result: result)
|
groupManager.kickGroupMember(methodCall: call, result: result)
|
||||||
|
@ -2,6 +2,7 @@ library flutter_openim_sdk;
|
|||||||
|
|
||||||
export 'src/enum/conversation_type.dart';
|
export 'src/enum/conversation_type.dart';
|
||||||
export 'src/enum/group_role.dart';
|
export 'src/enum/group_role.dart';
|
||||||
|
export 'src/enum/im_platform.dart';
|
||||||
export 'src/enum/listener_type.dart';
|
export 'src/enum/listener_type.dart';
|
||||||
export 'src/enum/message_status.dart';
|
export 'src/enum/message_status.dart';
|
||||||
export 'src/enum/message_type.dart';
|
export 'src/enum/message_type.dart';
|
||||||
|
9
lib/src/enum/im_platform.dart
Normal file
9
lib/src/enum/im_platform.dart
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
class IMPlatform {
|
||||||
|
static const ios = 1;
|
||||||
|
static const android = 2;
|
||||||
|
static const windows = 3;
|
||||||
|
static const xos = 4;
|
||||||
|
static const web = 5;
|
||||||
|
static const mini_web = 6;
|
||||||
|
static const linux = 7;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user