Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

How to access overlayEntry.remove() ? #36

Open
florentin89 opened this issue Nov 29, 2023 · 0 comments
Open

How to access overlayEntry.remove() ? #36

florentin89 opened this issue Nov 29, 2023 · 0 comments

Comments

@florentin89
Copy link

florentin89 commented Nov 29, 2023

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 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant