onSelectSuggestion method
Implementation
void onSelectSuggestion(DropDownModel<T> value) {
if (value == selectedValue) {
selectedValue = null;
searchTextController.text = "";
} else {
selectedValue = value;
searchTextController.text = value.text;
}
if (closeDropdownOnSelection) closeSuggestions();
setValidationError = null;
if (onOptionSelected != null) {
onOptionSelected!(selectedValue);
}
notifyListeners();
}