commit
2197b1c78f
@ -1,15 +1,42 @@ |
|||||||
# flutter_openim_sdk |
# flutter_openim_sdk |
||||||
|
|
||||||
A new Flutter project. |
A Flutter im plugin. |
||||||
|
|
||||||
## Getting Started |
## Getting Started |
||||||
|
|
||||||
This project is a starting point for a Flutter |
#### 1,初始化 |
||||||
[plug-in package](https://flutter.dev/developing-packages/), |
``` |
||||||
a specialized package that includes platform-specific implementation code for |
var msgListener = AdvancedMsgListener(); |
||||||
Android and/or iOS. |
|
||||||
|
/// 初始化SDK |
||||||
|
OpenIM.iMManager |
||||||
|
..initSDK( |
||||||
|
platform: 0, |
||||||
|
ipApi: 'Api接口地址', |
||||||
|
ipWs: 'WebSocket地址', |
||||||
|
dbPath: '数据库目录', |
||||||
|
listener: new InitSDKListener(), |
||||||
|
) |
||||||
|
|
||||||
For help getting started with Flutter, view our |
/// 添加消息监听(移除消息监听: OpenIM.iMManager.messageManager.removeAdvancedMsgListener(msgListener)) |
||||||
[online documentation](https://flutter.dev/docs), which offers tutorials, |
..messageManager.addAdvancedMsgListener(msgListener) |
||||||
samples, guidance on mobile development, and a full API reference. |
|
||||||
|
|
||||||
|
/// 设置发送消息进度监听 |
||||||
|
..messageManager.setMsgSendProgressListener(MsgSendProgressListener()) |
||||||
|
|
||||||
|
/// 设置好友关系监听 |
||||||
|
..friendshipManager.setFriendshipListener(FriendshipListener()) |
||||||
|
|
||||||
|
/// 设置会话监听 |
||||||
|
..conversationManager.setConversationListener(ConversationListener()) |
||||||
|
|
||||||
|
/// 设置群监听 |
||||||
|
..groupManager.setGroupListener(GroupListener()); |
||||||
|
``` |
||||||
|
#### 2,会话管理: OpenIM.iMManager.conversationManager |
||||||
|
|
||||||
|
#### 3,好友关系管理: OpenIM.iMManager.friendshipManager |
||||||
|
|
||||||
|
#### 4,消息管理: OpenIM.iMManager.messageManager |
||||||
|
|
||||||
|
#### 5,组管理: OpenIM.iMManager.groupManager |
||||||
|
Loading…
Reference in new issue