logout method

Future logout()

Implementation

Future<dynamic> logout() async {
  try {
    final res =
        await wrappedPromiseToFuture(V2TIMManagerWeb.timWeb!.logout());
    final code = res.code;
    if (code == 0) {
      completer = Completer<bool>();
      return CommonUtils.returnSuccessWithDesc("logout success");
    } else {
      return CommonUtils.returnSuccessWithDesc("logout failed");
    }
  } catch (err) {
    return CommonUtils.returnError(err);
  }
}