addFriend method

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

Implementation

Future<dynamic> addFriend(Map<String, dynamic> params) async {
  try {
    final res = await wrappedPromiseToFuture(
        timeWeb!.addFriend(AddFriend.formateParams(params)));
    final result = AddFriend.formateResult(jsToMap(res.data));

    return CommonUtils.returnSuccess<V2TimFriendOperationResult>(result);
  } catch (error) {
    return CommonUtils.returnErrorForValueCb<V2TimFriendOperationResult>(
        error);
  }
}