reportIncomingCall static method

Future<bool> reportIncomingCall({
  1. required String handle,
  2. required String uuid,
})

report incoming call from notification This will happen when you're flutter app receives notification on an incoming call and needs to report it to the native OS

Implementation

static Future<bool> reportIncomingCall(
    {required String handle, required String uuid}) async {
  final res = await _methodChannel.invokeMethod(
    _methodChannelReportIncomingCall,
    {"uuid": uuid, "handle": handle},
  );
  if (res) {
    final call = Call(
        address: handle,
        uuid: uuid,
        outgoing: false,
        callState: CallState.incoming);
    _callManager.addCall(call);
    await callStateChangeHandler!(call..callState = CallState.incoming);
  }
  return res as bool;
}