Improve DebugCreator docs (#74341)

This commit is contained in:
Michael Goderbauer 2021-01-20 13:42:21 -08:00 committed by GitHub
parent 48b3e8bf3a
commit def31b42b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1305,6 +1305,10 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// The object responsible for creating this render object.
///
/// Used in debug messages.
///
/// See also:
///
/// * [DebugCreator], which the [widgets] library uses as values for this field.
Object? debugCreator;
void _debugReportException(String method, Object exception, StackTrace stack) {

View file

@ -6239,8 +6239,8 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
/// A wrapper class for the [Element] that is the creator of a [RenderObject].
///
/// Attaching a [DebugCreator] attach the [RenderObject] will lead to better error
/// message.
/// Setting a [DebugCreator] as [RenderObject.debugCreator] will lead to better
/// error messages.
class DebugCreator {
/// Create a [DebugCreator] instance with input [Element].
DebugCreator(this.element);