quitGroup method

Future quitGroup(
  1. Map<String, dynamic> params
)

Implementation

Future<dynamic> quitGroup(Map<String, dynamic> params) async {
  try {
    final res = await wrappedPromiseToFuture(
        V2TIMManagerWeb.timWeb!.quitGroup(params['groupID']));
    final code = res.code;
    if (code == 0) {
      return CommonUtils.returnSuccessWithDesc("ok");
    } else {
      return CommonUtils.returnError('退群失败');
    }
  } catch (err) {
    return CommonUtils.returnError(err);
  }
}