clearSelection method
Clears the selected item and shows the search box. Optionally requests focus on the search field.
Implementation
void clearSelection({bool requestFocus = true}) {
_selectedItem = null;
_selectedKey = null;
_pendingKey = null;
clearSearch();
if (requestFocus) {
this.requestFocus();
}
notifyListeners();
}