flutter_easy_autocomplete
flutter_easy_autocomplete copied to clipboard
How to access overlayEntry.remove() ?
I have the next example:
EasyAutocomplete (
....
decoration: InputDecoration(
border: const OutlineInputBorder(),
hintText: 'Search...',
hintStyle: const TextStyle(color: Colors.white),
suffixIcon: IconButton(
onPressed: () {
setState(() {
myTextEditingController.clear();
_overlayEntry.closeOverlay(); // HOW TO ACCESS THIS FUNCTION ?
});
},
icon: const Icon(Icons.delete_forever_outlined, color: Colors.white),
),
),
....
);
How can I access _overlayEntry.closeOverlay() when I press a clear button inside decoration property, which is part of the EasyAutocomplete instance class ?