whenSelected method
When the user selects a suggestion, the onDismiss callback is called, and the selected state is set to false
Implementation
void whenSelected() {
setState(() {
selected = false;
});
onDismiss.call();
}
When the user selects a suggestion, the onDismiss callback is called, and the selected state is set to false
void whenSelected() {
setState(() {
selected = false;
});
onDismiss.call();
}