addFriend method

Future<Map> addFriend(
  1. String userID,
  2. dynamic config
)

Implementation

Future<Map<dynamic, dynamic>> addFriend(String userID, dynamic config) async {
  final result = await promiseToFuture(
          ZIM.getInstance()!.addFriend(userID, mapToJSObj(config)))
      .catchError((e) {
    throw PlatformException(code: e.code.toString(), message: e.message);
  });

  return jsObjectToMap(result);
}