Commit 5b828764 authored by Sander Kersten's avatar Sander Kersten Committed by Hans Muller

Remove leftover of GlobalKey removal listeners (#27432)

parent 28fc34c0
...@@ -138,7 +138,6 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key { ...@@ -138,7 +138,6 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key {
const GlobalKey.constructor() : super.empty(); const GlobalKey.constructor() : super.empty();
static final Map<GlobalKey, Element> _registry = <GlobalKey, Element>{}; static final Map<GlobalKey, Element> _registry = <GlobalKey, Element>{};
static final Set<GlobalKey> _removedKeys = HashSet<GlobalKey>();
static final Set<Element> _debugIllFatedElements = HashSet<Element>(); static final Set<Element> _debugIllFatedElements = HashSet<Element>();
static final Map<GlobalKey, Element> _debugReservations = <GlobalKey, Element>{}; static final Map<GlobalKey, Element> _debugReservations = <GlobalKey, Element>{};
...@@ -164,10 +163,8 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key { ...@@ -164,10 +163,8 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key {
} }
return true; return true;
}()); }());
if (_registry[this] == element) { if (_registry[this] == element)
_registry.remove(this); _registry.remove(this);
_removedKeys.add(this);
}
} }
void _debugReserveFor(Element parent) { void _debugReserveFor(Element parent) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment