chatStatusFromString function

ChatStatus chatStatusFromString(
  1. String status
)

Implementation

ChatStatus chatStatusFromString(String status) {
  switch (status) {
    case 'ACTIVE':
      return ChatStatus.ACTIVE;
    case 'PENDING':
      return ChatStatus.PENDING;
    case 'ENDED':
      return ChatStatus.ENDED;
    default:
      throw ArgumentError('Invalid string for ChatStatus');
  }
}