tapOption method

void tapOption(
  1. InquiryOption option
)

This method is called when the user taps in an option. If the option was previously selected the is deselected, in the other case then selects it.

Implementation

void tapOption(InquiryOption option) async {
  if (selectedOption == option.id) {
    selectedOption = null;
  } else {
    selectedOption = option.id;
  }
  notifyListeners();
}