onCallIncomingWhenTerminated property

void onCallIncomingWhenTerminated=(CallEventHandler? handler)

Set an incoming call handler function which is called when the app is in the background or terminated.

This provided handler must be a top-level function and cannot be anonymous otherwise an ArgumentError will be thrown.

Implementation

static set onCallIncomingWhenTerminated(CallEventHandler? handler) {
  _onCallIncomingWhenTerminated = handler;

  if (handler != null) {
    instance._registerBackgroundCallEventHandler(
        handler, BackgroundCallbackName.INCOMING_IN_BACKGROUND);
  }
}