File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -2390,18 +2390,27 @@ class _ConstraintRenderBox extends RenderBox
23902390 id = _IndexConstraintId (targetIndex);
23912391 }
23922392
2393- /// Fewer reads to nodesMap for faster constraint building
2394- _ConstrainedNode ? node = id.getCacheNode (_buildNodeTreesCount ^ hashCode);
2395- if (node != null ) {
2396- return node;
2393+ _ConstrainedNode ? node;
2394+ int ? contextHash;
2395+ if (id.runtimeType == ConstraintId ) {
2396+ /// Fewer reads to nodesMap for faster constraint building
2397+ contextHash = _buildNodeTreesCount ^ hashCode;
2398+ node = id.getCacheNode (contextHash);
2399+ if (node != null ) {
2400+ return node;
2401+ }
23972402 }
23982403
23992404 node = nodesMap[id];
24002405 if (node == null ) {
24012406 node = _ConstrainedNode ()..nodeId = id;
24022407 nodesMap[id] = node;
24032408 }
2404- id.setCacheNode (_buildNodeTreesCount ^ hashCode, node);
2409+
2410+ if (id.runtimeType == ConstraintId ) {
2411+ id.setCacheNode (contextHash! , node);
2412+ }
2413+
24052414 return node;
24062415 }
24072416
You can’t perform that action at this time.
0 commit comments