code readability: fix awkward variable shadowing (#23886)
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index 45e05c9..a7b2b4b 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart
@@ -2414,17 +2414,17 @@ final bool childrenMergeIntoParent = mergeIntoParent || config.isMergingSemanticsOfDescendants; visitChildrenForSemantics((RenderObject renderChild) { - final _SemanticsFragment fragment = renderChild._getSemanticsForParent( + final _SemanticsFragment parentFragment = renderChild._getSemanticsForParent( mergeIntoParent: childrenMergeIntoParent, ); - if (fragment.dropsSemanticsOfPreviousSiblings) { + if (parentFragment.dropsSemanticsOfPreviousSiblings) { fragments.clear(); toBeMarkedExplicit.clear(); if (!config.isSemanticBoundary) dropSemanticsOfPreviousSiblings = true; } // Figure out which child fragments are to be made explicit. - for (_InterestingSemanticsFragment fragment in fragment.interestingFragments) { + for (_InterestingSemanticsFragment fragment in parentFragment.interestingFragments) { fragments.add(fragment); fragment.addAncestor(this); fragment.addTags(config.tagsForChildren);
diff --git a/packages/flutter/test/widgets/semantics_tester.dart b/packages/flutter/test/widgets/semantics_tester.dart index c887afc..6b2f204 100644 --- a/packages/flutter/test/widgets/semantics_tester.dart +++ b/packages/flutter/test/widgets/semantics_tester.dart
@@ -296,10 +296,10 @@ return true; bool result = true; final Iterator<TestSemantics> it = children.iterator; - for (final SemanticsNode node in node.debugListChildrenInOrder(childOrder)) { + for (final SemanticsNode child in node.debugListChildrenInOrder(childOrder)) { it.moveNext(); final bool childMatches = it.current._matches( - node, + child, matchState, ignoreRect: ignoreRect, ignoreTransform: ignoreTransform,