getCommentStatusFromValue function
Implementation
CommentStatus getCommentStatusFromValue(String? value) {
if (value == null) {
return CommentStatus.pending;
}
return CommentStatus.values
.where((element) => element.name.toLowerCase() == value.toLowerCase())
.firstOrNull ??
CommentStatus.pending;
}