diff --git a/packages/flutter/lib/src/foundation/node.dart b/packages/flutter/lib/src/foundation/node.dart index ca383fb152..a32f30a481 100644 --- a/packages/flutter/lib/src/foundation/node.dart +++ b/packages/flutter/lib/src/foundation/node.dart @@ -92,12 +92,9 @@ class AbstractNode { /// Typically called only from the [parent]'s [attach] method, and by the /// [owner] to mark the root of a tree as attached. /// - /// Subclasses with children should override this method to first call their - /// inherited [attach] method, and then [attach] all their children to the - /// same [owner]. - /// - /// Implementations of this method should start with a call to the inherited - /// method, as in `super.attach(owner)`. + /// Subclasses with children should override this method to + /// [attach] all their children to the same [owner] + /// after calling the inherited method, as in `super.attach(owner)`. @mustCallSuper void attach(covariant Object owner) { assert(_owner == null); @@ -109,11 +106,9 @@ class AbstractNode { /// Typically called only from the [parent]'s [detach], and by the [owner] to /// mark the root of a tree as detached. /// - /// Subclasses with children should override this method to first call their - /// inherited [detach] method, and then [detach] all their children. - /// - /// Implementations of this method should end with a call to the inherited - /// method, as in `super.detach()`. + /// Subclasses with children should override this method to + /// [detach] all their children after calling the inherited method, + /// as in `super.detach()`. @mustCallSuper void detach() { assert(_owner != null); diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index 1cff262dde..d777791863 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart @@ -518,12 +518,9 @@ abstract class Layer with DiagnosticableTreeMixin { /// Typically called only from the [parent]'s [attach] method, and by the /// [owner] to mark the root of a tree as attached. /// - /// Subclasses with children should override this method to first call their - /// inherited [attach] method, and then [attach] all their children to the - /// same [owner]. - /// - /// Implementations of this method should start with a call to the inherited - /// method, as in `super.attach(owner)`. + /// Subclasses with children should override this method to + /// [attach] all their children to the same [owner] + /// after calling the inherited method, as in `super.attach(owner)`. @mustCallSuper void attach(covariant Object owner) { assert(_owner == null); @@ -535,11 +532,9 @@ abstract class Layer with DiagnosticableTreeMixin { /// Typically called only from the [parent]'s [detach], and by the [owner] to /// mark the root of a tree as detached. /// - /// Subclasses with children should override this method to first call their - /// inherited [detach] method, and then [detach] all their children. - /// - /// Implementations of this method should end with a call to the inherited - /// method, as in `super.detach()`. + /// Subclasses with children should override this method to + /// [detach] all their children after calling the inherited method, + /// as in `super.detach()`. @mustCallSuper void detach() { assert(_owner != null); diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index 730bf50506..d988fc923e 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -2074,12 +2074,9 @@ abstract class RenderObject with DiagnosticableTreeMixin implements HitTestTarge /// Typically called only from the [parent]'s [attach] method, and by the /// [owner] to mark the root of a tree as attached. /// - /// Subclasses with children should override this method to first call their - /// inherited [attach] method, and then [attach] all their children to the - /// same [owner]. - /// - /// Implementations of this method should start with a call to the inherited - /// method, as in `super.attach(owner)`. + /// Subclasses with children should override this method to + /// [attach] all their children to the same [owner] + /// after calling the inherited method, as in `super.attach(owner)`. @mustCallSuper void attach(PipelineOwner owner) { assert(!_debugDisposed); @@ -2116,11 +2113,9 @@ abstract class RenderObject with DiagnosticableTreeMixin implements HitTestTarge /// Typically called only from the [parent]'s [detach], and by the [owner] to /// mark the root of a tree as detached. /// - /// Subclasses with children should override this method to first call their - /// inherited [detach] method, and then [detach] all their children. - /// - /// Implementations of this method should end with a call to the inherited - /// method, as in `super.detach()`. + /// Subclasses with children should override this method to + /// [detach] all their children after calling the inherited method, + /// as in `super.detach()`. @mustCallSuper void detach() { assert(_owner != null);