feedbackSubmissionKindFromApiName function

FeedbackSubmissionKind? feedbackSubmissionKindFromApiName(
  1. String? name
)

Implementation

FeedbackSubmissionKind? feedbackSubmissionKindFromApiName(String? name) {
  if (name == null) {
    return null;
  }
  switch (name.trim().toLowerCase()) {
    case 'bugreport':
    case 'bug-report':
    case 'bug_report':
    case 'bug':
      return FeedbackSubmissionKind.bugReport;
    case 'featuresuggestion':
    case 'feature-suggestion':
    case 'feature_suggestion':
    case 'feature':
    case 'feature-request':
    case 'feature_request':
    case 'featurerequest':
      return FeedbackSubmissionKind.featureSuggestion;
    case 'rating':
    case 'ratings':
      return FeedbackSubmissionKind.rating;
    default:
      return null;
  }
}