reportCallEnded method

Future<void> reportCallEnded (
  1. String uuid,
  2. DateTime dateEnded,
  3. FCXCallEndedReason endedReason

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.

dateEnded is the time at which the call ended. If null, the current time is used.

endedReason is the reason that the call ended.


Future<void> reportCallEnded(
    String uuid, DateTime dateEnded, FCXCallEndedReason endedReason) async {
  try {
    await _methodChannel.invokeMethod('$_PROVIDER.reportCallEnded', {
      'uuid': uuid,
      'dateEnded': dateEnded?.toIso8601String(),
      'endedReason': endedReason?.index ?? FCXCallEndedReason.failed
  } on PlatformException catch (e) {
    var exception = FCXException(e.code, e.message);
    throw exception;