call method

  1. @override
Future<void> call(
  1. String receiverCuid,
  2. String callContext,
  3. Map<String, dynamic>? callOptions,
  4. SignedCallVoIPCallHandler voIPCallHandler,
)
override

Initiates a VoIP call

receiverCuid - cuid of the person whomsoever call needs to be initiated callContext - context(reason) of the call that is displayed on the call screen callOptions - configuration(metadata) for a VoIP call voIPCallHandler - to get the initialization update(i.e. success/failure)

Implementation

@override
Future<void> call(
    String receiverCuid,
    String callContext,
    Map<String, dynamic>? callOptions,
    SignedCallVoIPCallHandler voIPCallHandler) {
  _voIPCallHandler = voIPCallHandler;

  final callProperties = <String, dynamic>{};
  callProperties[keyReceiverCuid] = receiverCuid;
  callProperties[keyCallContext] = callContext;
  callProperties[keyCallOptions] = callOptions;
  return _methodChannel
      .invokeMethod(SCMethodCall.call, {argCallProperties: callProperties});
}