handleSelect method

bool handleSelect(
  1. FeedbackSurveyResponse selected
)

Handle user selecting a response.

Implementation

bool handleSelect(FeedbackSurveyResponse selected) {
  lastResponse.value = selected;
  _updateLastShownTime();

  // Log response event
  _logEvent('responded', response: selected.name);

  if (selected == FeedbackSurveyResponse.dismissed) {
    _showThanksAndClose();
    return true;
  }

  // Check if we should show transcript prompt
  if (_shouldShowTranscriptPrompt(selected)) {
    state.value = FeedbackSurveyState.transcriptPrompt;
    inputValue.value = '';
    _logEvent('transcript_prompt_appeared');
    return true;
  }

  _showThanksAndClose();
  return true;
}