send method

Future<bool> send({
  1. required List<ZegoCallUser> invitees,
  2. required bool isVideoCall,
  3. String customData = '',
  4. String? callID,
  5. String? resourceID,
  6. String? notificationTitle,
  7. String? notificationMessage,
  8. int timeoutSeconds = 60,
})

This function is used to send call invitations to one or more specified users.

You can provide a list of target users invitees and specify whether it is a video call isVideoCall. If it is not a video call, it defaults to an audio call. You can also pass additional custom data customData to the invitees. Additionally, you can specify the call ID callID. If not provided, the system will generate one automatically based on certain rules. If you want to set a ringtone for offline call invitations, set resourceID to a value that matches the push resource ID in the ZEGOCLOUD management console. You can also set the notification title notificationTitle and message notificationMessage. If the call times out, the call will automatically hang up after the specified timeout duration timeoutSeconds (in seconds).

Note that this function behaves the same as ZegoSendCallInvitationButton.

Implementation

Future<bool> send({
  required List<ZegoCallUser> invitees,
  required bool isVideoCall,
  String customData = '',
  String? callID,
  String? resourceID,
  String? notificationTitle,
  String? notificationMessage,
  int timeoutSeconds = 60,
}) async {
  return _invitation.send(
    invitees: invitees,
    isVideoCall: isVideoCall,
    customData: customData,
    callID: callID,
    resourceID: resourceID,
    notificationTitle: notificationTitle,
    notificationMessage: notificationMessage,
    timeoutSeconds: timeoutSeconds,
  );
}