transferGroupOwner method

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

Implementation

Future<dynamic> transferGroupOwner(Map<String, dynamic> params) async {
  try {
    final changeGroupOwnerParams = TransferGroupOwner.formatParams(params);
    final res = await wrappedPromiseToFuture(
        timeweb!.changeGroupOwner(changeGroupOwnerParams));
    if (res.code == 0) {
      return CommonUtils.returnSuccessWithDesc('ok');
    }
    return CommonUtils.returnError('transfer group member failed');
  } catch (error) {
    return CommonUtils.returnError(error.toString());
  }
}