fromString static method

CometChatCallAction fromString(
  1. String? value
)

Parses a string value into a CometChatCallAction.

Returns CometChatCallAction.unknown for null or unrecognized values.

Implementation

static CometChatCallAction fromString(String? value) {
  switch (value) {
    case 'initiated':
      return CometChatCallAction.initiated;
    case 'cancelled':
      return CometChatCallAction.cancelled;
    case 'unanswered':
      return CometChatCallAction.unanswered;
    case 'ongoing':
      return CometChatCallAction.ongoing;
    case 'rejected':
      return CometChatCallAction.rejected;
    case 'ended':
      return CometChatCallAction.ended;
    case 'busy':
      return CometChatCallAction.busy;
    default:
      return CometChatCallAction.unknown;
  }
}