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
2390
2390
id = _IndexConstraintId (targetIndex);
2391
2391
}
2392
2392
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
+ }
2397
2402
}
2398
2403
2399
2404
node = nodesMap[id];
2400
2405
if (node == null ) {
2401
2406
node = _ConstrainedNode ()..nodeId = id;
2402
2407
nodesMap[id] = node;
2403
2408
}
2404
- id.setCacheNode (_buildNodeTreesCount ^ hashCode, node);
2409
+
2410
+ if (id.runtimeType == ConstraintId ) {
2411
+ id.setCacheNode (contextHash! , node);
2412
+ }
2413
+
2405
2414
return node;
2406
2415
}
2407
2416
You can’t perform that action at this time.
0 commit comments