chatStringFromChatStatus function
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');
}
}