@@ -1956,26 +1956,24 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
19561956 /// Mark this node as needing an update to its semantics
19571957 /// description.
19581958 ///
1959- /// If the change did not involve a removal or addition of
1960- /// semantics, only the change of semantics (e.g. isChecked changing
1961- /// from true to false, as opposed to isChecked changing from being
1962- /// true to not being changed at all), then you can pass the
1963- /// onlyChanges argument with the value true to reduce the cost. If
1964- /// semantics are being added or removed, more work needs to be done
1965- /// to update the semantics tree. If you pass 'onlyChanges: true'
1966- /// but this node, which previously had a SemanticsNode, no longer
1967- /// has one, or previously did not set any semantics, but now does,
1968- /// or previously had a child that returned annotators, but no
1969- /// longer does, or other such combinations, then you will either
1970- /// assert during the subsequent call to [flushSemantics()] or you
1971- /// will have out-of-date information in the semantics tree.
1972- ///
1973- /// If the geometry might have changed in any way, then again, more
1974- /// work needs to be done to update the semantics tree (to deal with
1975- /// clips). You can pass the noGeometry argument to avoid this work
1976- /// in the case where only the labels or flags changed. If you pass
1977- /// 'noGeometry: true' when the geometry did change, the semantic
1978- /// tree will be out of date.
1959+ /// If the change did not involve a removal or addition of semantics, only the
1960+ /// change of semantics (e.g. isChecked changing from true to false, as
1961+ /// opposed to isChecked changing from being true to not being changed at
1962+ /// all), then you can pass the onlyChanges argument with the value true to
1963+ /// reduce the cost. If semantics are being added or removed, more work needs
1964+ /// to be done to update the semantics tree. If you pass 'onlyChanges: true'
1965+ /// but this node, which previously had a SemanticsNode, no longer has one, or
1966+ /// previously did not set any semantics, but now does, or previously had a
1967+ /// child that returned annotators, but no longer does, or other such
1968+ /// combinations, then you will either assert during the subsequent call to
1969+ /// [PipelineOwner.flushSemantics()] or you will have out-of-date information
1970+ /// in the semantics tree.
1971+ ///
1972+ /// If the geometry might have changed in any way, then again, more work needs
1973+ /// to be done to update the semantics tree (to deal with clips). You can pass
1974+ /// the noGeometry argument to avoid this work in the case where only the
1975+ /// labels or flags changed. If you pass 'noGeometry: true' when the geometry
1976+ /// did change, the semantic tree will be out of date.
19791977 void markNeedsSemanticsUpdate ({ bool onlyChanges: false , bool noGeometry: false }) {
19801978 assert (! attached || ! owner._debugDoingSemantics);
19811979 if ((attached && owner._semanticsOwner == null ) || (_needsSemanticsUpdate && onlyChanges && (_needsSemanticsGeometryUpdate || noGeometry)))
@@ -2089,31 +2087,30 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
20892087 visitChildren (visitor);
20902088 }
20912089
2092- /// Returns functions that will annotate a SemanticsNode with the
2093- /// semantics of this RenderObject.
2090+ /// Returns a function that will annotate a [ SemanticsNode] with the semantics
2091+ /// of this [ RenderObject] .
20942092 ///
2095- /// To annotate a SemanticsNode for this node, return all the
2096- /// annotators provided by the superclass, plus an annotator that
2097- /// adds the annotations. When the behavior of the annotators would
2093+ /// To annotate a SemanticsNode for this node, return an annotator that
2094+ /// adds the annotations. When the behavior of the annotator would
20982095 /// change (e.g. the box is now checked rather than unchecked), call
2099- /// [markNeedsSemanticsUpdate() ] to indicate to the rendering system
2096+ /// [markNeedsSemanticsUpdate] to indicate to the rendering system
21002097 /// that the semantics tree needs to be rebuilt.
21012098 ///
21022099 /// To introduce a new SemanticsNode, set hasSemantics to true for
2103- /// this object. The functions returned by this function will be used
2100+ /// this object. The function returned by this function will be used
21042101 /// to annotate the SemanticsNode for this object.
21052102 ///
21062103 /// Semantic annotations are persistent. Values set in one pass will
21072104 /// still be set in the next pass. Therefore it is important to
2108- /// explicitly set fields to false once they are no longer true --
2105+ /// explicitly set fields to false once they are no longer true;
21092106 /// setting them to true when they are to be enabled, and not
21102107 /// setting them at all when they are not, will mean they remain set
21112108 /// once enabled once and will never get unset.
21122109 ///
2113- /// If the number of annotators you return will change from zero to
2114- /// non-zero, and hasSemantics isn't true, then the associated call
2115- /// to markNeedsSemanticsUpdate() must not have ' onlyChanges' set, as
2116- /// it is possible that the node should be entirely removed.
2110+ /// If the value return will change from null to non-null (or vice versa), and
2111+ /// [ hasSemantics] isn't true, then the associated call to
2112+ /// [ markNeedsSemanticsUpdate] must not have ` onlyChanges` set, as it is
2113+ /// possible that the node should be entirely removed.
21172114 SemanticAnnotator get semanticAnnotator => null ;
21182115
21192116
@@ -2247,6 +2244,12 @@ abstract class RenderObjectWithChildMixin<ChildType extends RenderObject> implem
22472244 _child.detach ();
22482245 }
22492246
2247+ @override
2248+ void redepthChildren () {
2249+ if (_child != null )
2250+ redepthChild (_child);
2251+ }
2252+
22502253 @override
22512254 void visitChildren (RenderObjectVisitor visitor) {
22522255 if (_child != null )
0 commit comments