onEvent property

Stream<CallKeepEvent?> onEvent

Listen to a CallKeepEvent

CallKeep.onEvent.listen((event) {

// event type => data runtime type - description

CallKeepEventType.callIncoming => CallKeepCallEvent - Received an incoming call

CallKeepEventType.callStart => CallKeepCallEvent - Started an outgoing call

CallKeepEventType.callAccept => CallKeepCallEvent - Accepted an incoming call

CallKeepEventType.callDecline => CallKeepCallEvent - Declined an incoming call

CallKeepEventType.callEnded => CallKeepCallEvent - Ended an incoming/outgoing call

CallKeepEventType.callTimedOut => CallKeepCallEvent - Missed an incoming call

CallKeepEventType.missedCallback => CallKeepCallEvent - calling back after a missed call notification - Android only (click action Call back from missed call notification)

CallKeepEventType.holdToggled => CallKeepHoldEvent - CallKit hold was toggled - iOS only

CallKeepEventType.muteToggled => CallKeepMuteEvent - CallKit Mute was toggled - iOS only

CallKeepEventType.dmtfToggled => CallKeepDmtfEvent - DMTF (Dual Tone Multi Frequency) was toggled - iOS only

CallKeepEventType.callGroupToggled => CallKeepCallGroupEvent - Call group was toggled

  • iOS only

CallKeepEventType.audioSessionToggled => CallKeepAudioSessionEvent - AVAudioSession was toggled (activated/deactivated) - iOS only

CallKeepEventType.audioSessionToggled => CallKeepVoipTokenEvent- PushKit token was updated for VoIP - iOS only

}

Implementation

Stream<CallKeepEvent?> get onEvent =>
    _eventChannel.receiveBroadcastStream().map(_handleCallKeepEvent);