searchable_dropdown
searchable_dropdown copied to clipboard
onDismissed should also be called when clicked outside the box
So when I was using the library, I came up with this error that when we are dismissing the modalBottomSheet or dialog or menu, the onDismissed function is not called at that time.
onDismissed function is called when we select an item from the list but not when we click outside the dialog box to close the dialog or modal bottom sheet.
So if you can work and make something like onPopupDismissed, it will help in many use cases.
+1
There was a functional onPopupDismissed on 2.0.1, migrated to 5.0.2 and now it is gone. Any new changes that replaced this deprecated function?
@MaxiStefan now there is a onDismissed function call inside popupProps. So when you use a module such as dialog or modalBottomSheet, there is a method as onDismissed. You can use that as shown below:
popupProps: PopupPropsMultiSelection.modalBottomSheet( onDismissed: () => print('Dismissed'), isFilterOnline: false, showSearchBox: true, textStyle: TextStyle( color: Colors.grey, fontSize: 13 ), searchFieldProps: TextFieldProps( decoration: InputDecoration( prefixIcon: Icon(Icons.search), hintText: "Search Here”, border: OutlineInputBorder( borderSide: BorderSide(color: Colors.black, width: 1.0), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide(color: Colors.black, width: 1.0), ), ), ), itemBuilder: _customPopupItemBuilderExample2, ),
Will look into it, cheers
@homide we fixed the issue if the user dismiss the popup by clicking outside the popup. it will be available in the next version which will be released today