reportCallEnded method
Reports to the provider that a call with the specified identifier ended at a given date for a particular reason.
uuid
is the unique identifier of the call.
Note that this value will be uppercased by the CallKit.
dateEnded
is the time at which the call ended.
If null, the current time is used.
endedReason
is the reason that the call ended.
Implementation
Future<void> reportCallEnded(
String uuid,
DateTime? dateEnded,
FCXCallEndedReason endedReason,
) async {
try {
String method = 'reportCallEnded';
await _methodChannel.invokeMethod('$_PROVIDER.$method', {
'uuid': uuid,
'dateEnded': dateEnded?.toIso8601String(),
'endedReason': endedReason.index,
});
_FCXLog._i(runtimeType, '$method uuid: $uuid');
} on PlatformException catch (e) {
var exception = FCXException(e.code, e.message);
_FCXLog._e(runtimeType, exception);
throw exception;
}
}