|
|
|
|
|
|
this.componentKey1 = componentKey1; |
|
|
|
this.componentKey2 = componentKey2; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public bool Equals(CompositeKey other) { |
|
|
|
if (ReferenceEquals(null, other)) { |
|
|
|
return false; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public override int GetHashCode() { |
|
|
|
return (this.componentKey1 != null ? this.componentKey1.GetHashCode() : 0) ^ |
|
|
|
return (this.componentKey1 != null ? this.componentKey1.GetHashCode() : 0) ^ |
|
|
|
(this.componentKey2 != null ? this.componentKey2.GetHashCode() : 0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
D.assert(element.widget.key != null); |
|
|
|
GlobalKey key = (GlobalKey) element.widget.key; |
|
|
|
CompositeKey compKey = new CompositeKey(Window.instance, key); |
|
|
|
|
|
|
|
|
|
|
|
D.assert(_registry.ContainsKey(compKey)); |
|
|
|
duplicates = duplicates ?? new Dictionary<GlobalKey, HashSet<Element>>(); |
|
|
|
var elements = duplicates.putIfAbsent(key, () => new HashSet<Element>()); |
|
|
|
|
|
|
if (fn != null) { |
|
|
|
fn(); |
|
|
|
} |
|
|
|
|
|
|
|
this._element.markNeedsBuild(); |
|
|
|
} |
|
|
|
|
|
|
|