Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove an OverlayEntry from an Overlay?

Tags:

flutter

dart

I'm simply trying to remove an OverlayEntry that I inserted into an Overlay earlier:

rootOverlay.insert(entry);

I can't seem to find a method that does that though.
I did find a private method _removein the OverlayState class, but I can not access that.

Am I missing something? How would you do that in Flutter?

like image 680
Bram Vanbilsen Avatar asked May 21 '18 20:05

Bram Vanbilsen


1 Answers

The remove method is not inside OverlayState but the OverlayEntry itself

entry.remove()
like image 69
Rémi Rousselet Avatar answered Oct 03 '22 23:10

Rémi Rousselet