isFriend static method

Future<bool> isFriend(
  1. UserId id
)

Check if user is friend of current user.

id User identifier.

Implementation

static Future<bool> isFriend(UserId id) {
  return NativeBridge.async('Communities.isFriend', jsonEncode(id.toJSON()))
      .then((result) => jsonDecode(result)['result'] == true);
}