mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix OverlayEntry.remove to work even after the Overlay is disposed. (#3412)
This commit is contained in:
parent
9aeeb15849
commit
fffbf6e97b
@ -215,9 +215,9 @@ class OverlayState extends State<Overlay> {
|
||||
}
|
||||
|
||||
void _remove(OverlayEntry entry) {
|
||||
setState(() {
|
||||
_entries.remove(entry);
|
||||
});
|
||||
_entries.remove(entry);
|
||||
if (mounted)
|
||||
setState(() { /* entry was removed */ });
|
||||
}
|
||||
|
||||
/// (DEBUG ONLY) Check whether a given entry is visible (i.e., not behind an opaque entry).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user