diff --git a/packages/flutter/lib/src/rendering/paragraph.dart b/packages/flutter/lib/src/rendering/paragraph.dart index 4fd946a88d..d53720c869 100644 --- a/packages/flutter/lib/src/rendering/paragraph.dart +++ b/packages/flutter/lib/src/rendering/paragraph.dart @@ -71,7 +71,7 @@ class TextParentData extends ParentData with ContainerParentDataMixin } @override - String toString() =>'widget: $span, ${offset == null ? "not laid out" : "offset: $offset"}'; + String toString() => 'widget: $span, ${offset == null ? "not laid out" : "offset: $offset"}'; } /// A mixin that provides useful default behaviors for text [RenderBox]es diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index da4132c16a..8628b57ba4 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1514,7 +1514,20 @@ abstract class ParentDataWidget extends ProxyWidget { /// that [applyParentData] will write to. /// /// This is only used in error messages to tell users what widget typically - /// wraps this ParentDataWidget. + /// wraps this [ParentDataWidget]. + /// + /// ## Implementations + /// + /// The returned type should be a subclass of `RenderObjectWidget`. + /// + /// ```dart + /// @override + /// Type get debugTypicalAncestorWidgetClass => FrogJar; + /// ``` + /// + /// If the "typical" parent is generic (`Foo`), consider specifying either + /// a typical type argument (e.g. `Foo` if `int` is typically how the + /// type is specialized), or specifying the upper bound (e.g. `Foo`). Type get debugTypicalAncestorWidgetClass; Iterable _debugDescribeIncorrectParentDataType({ diff --git a/packages/flutter/lib/src/widgets/widget_span.dart b/packages/flutter/lib/src/widgets/widget_span.dart index 34afb66f3a..65427e7ed2 100644 --- a/packages/flutter/lib/src/widgets/widget_span.dart +++ b/packages/flutter/lib/src/widgets/widget_span.dart @@ -290,7 +290,7 @@ class _WidgetSpanParentData extends ParentDataWidget { } @override - Type get debugTypicalAncestorWidgetClass => RenderInlineChildrenContainerDefaults; + Type get debugTypicalAncestorWidgetClass => RichText; } // A RenderObjectWidget that automatically applies text scaling on inline