call method
Future<void>
call(
- String receiverCuid,
- String callContext,
- Map<
String, dynamic> ? callOptions, - 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});
}