chatStringFromChatStatus function

String? chatStringFromChatStatus(
  1. ChatStatus? status
)

Implementation

String? chatStringFromChatStatus(ChatStatus? status) {
  if (status == null) {
    return null;
  }
  switch (status) {
    case ChatStatus.ACTIVE:
      return 'ACTIVE';
    case ChatStatus.PENDING:
      return 'PENDING';
    case ChatStatus.ENDED:
      return 'ENDED';
    default:
      throw ArgumentError('Invalid ChatStatus');
  }
}