setFriends static method

Future<int> setFriends(
  1. UserIdList ids
)

Set the provided users as friends of current user. Important: Existing friends will be removed!

ids List of user identifiers.

Implementation

static Future<int> setFriends(UserIdList ids) {
  return NativeBridge.async(
          'Communities.setFriends', jsonEncode(ids.toJSON()))
      .then((result) => jsonDecode(result)['result']);
}