Fix for new analyzer lint (#133923)

For https://github.com/flutter/flutter/issues/133922
This commit is contained in:
Zachary Anderson 2023-09-02 12:47:28 -07:00 committed by GitHub
parent 685ce14b2d
commit 3896912d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3110,7 +3110,7 @@ class BuildOwner {
assert(_globalKeyRegistry.containsKey(key));
duplicates ??= <GlobalKey, Set<Element>>{};
// Uses ordered set to produce consistent error message.
final Set<Element> elements = duplicates.putIfAbsent(key, () => LinkedHashSet<Element>());
final Set<Element> elements = duplicates.putIfAbsent(key, () => <Element>{});
elements.add(element);
elements.add(_globalKeyRegistry[key]!);
}