callKeepEventTypeFromName function

CallKeepEventType callKeepEventTypeFromName(
  1. String eventName
)

Implementation

CallKeepEventType callKeepEventTypeFromName(String eventName) {
  switch (eventName) {
    case 'co.doneservices.callkeep.DID_UPDATE_DEVICE_PUSH_TOKEN_VOIP':
      return CallKeepEventType.devicePushTokenUpdated;
    case 'co.doneservices.callkeep.ACTION_CALL_INCOMING':
      return CallKeepEventType.callIncoming;
    case 'co.doneservices.callkeep.ACTION_CALL_START':
      return CallKeepEventType.callStart;
    case 'co.doneservices.callkeep.ACTION_CALL_ACCEPT':
      return CallKeepEventType.callAccept;
    case 'co.doneservices.callkeep.ACTION_CALL_DECLINE':
      return CallKeepEventType.callDecline;
    case 'co.doneservices.callkeep.ACTION_CALL_ENDED':
      return CallKeepEventType.callEnded;
    case 'co.doneservices.callkeep.ACTION_CALL_TIMEOUT':
      return CallKeepEventType.callTimedOut;
    case 'co.doneservices.callkeep.ACTION_CALL_CALLBACK':
      return CallKeepEventType.missedCallback;
    case 'co.doneservices.callkeep.ACTION_CALL_TOGGLE_HOLD':
      return CallKeepEventType.holdToggled;
    case 'co.doneservices.callkeep.ACTION_CALL_TOGGLE_MUTE':
      return CallKeepEventType.muteToggled;
    case 'co.doneservices.callkeep.ACTION_CALL_TOGGLE_DMTF':
      return CallKeepEventType.dmtfToggled;
    case 'co.doneservices.callkeep.ACTION_CALL_TOGGLE_GROUP':
      return CallKeepEventType.callGroupToggled;
    case 'co.doneservices.callkeep.ACTION_CALL_TOGGLE_AUDIO_SESSION':
      return CallKeepEventType.audioSessionToggled;
    default:
      throw Exception('Unknown CallKeep Event');
  }
}