logout method

Future<void> logout(
  1. TUICallback callback
)

logout IM

Implementation

Future<void> logout(TUICallback callback) async {
  V2TimCallback res = await TencentImSDKPlugin.v2TIMManager.logout();

  if (res.code == 0) {
    await TencentImSDKPlugin.v2TIMManager.unInitSDK();
    TUICore.instance.notifyEvent(logoutSuccessEvent);
    callback.onSuccess!();
  } else {
    callback.onError!(res.code,res.desc);
  }
}