setReferrer static method

Future setReferrer(
  1. UserId id,
  2. String event,
  3. Map<String, String> customData
)

Sets referrer id for current user.

id Id of referrer user. event Referrer event. customData Custom key-value pairs.

Implementation

static Future setReferrer(
    UserId id, String event, Map<String, String> customData) {
  Map<String, dynamic> body = {
    'userId': id.toJSON(),
    'eventName': event,
    'customData': customData
  };
  return NativeBridge.async('Invites.setReferrer', jsonEncode(body));
}