flutter_openim_sdk_ffi 0.0.1-alpha.3 copy "flutter_openim_sdk_ffi: ^0.0.1-alpha.3" to clipboard
flutter_openim_sdk_ffi: ^0.0.1-alpha.3 copied to clipboard

openim_sdk in flutter by ffi

flutter_openim_sdk_ffi #

支持 windows、ios、android、macos、linux 对应 openim v3.5

警告!! #

当前为测试版本可能面对不兼容修改 受包大小限制 macos 和 ios 只提供 arm64 所以只能跑真机

init #

  await OpenIMManager.init(
    apiAddr: 'https://web.muka.site/api',
    wsAddr: 'wss://web.muka.site/msg_gateway',
  );

Listener #

  class ImController extends GetxController with OpenIMListener {
  @override
  void onInit() {
    OpenIMManager.addListener(this);
    super.onInit();
  }

  @override
  void onClose() {
    OpenIMManager.removeListener(this);
    super.onClose();
  }

  @override
  void onConnectSuccess() {
    print('连接成功');
  }

  @override
  void onConnectFailed(int? code, String? errorMsg) {
    print(code);
    print(errorMsg);
  }

  @override
  void onConnecting() {
    print('连接中');
  }

  ...
}

Other #

  UserInfo userInfo = await OpenIM.iMManager.login(uid: userID, token: token);

to OpenIMDoc