Commit f2ab841a authored by Jacob Richman's avatar Jacob Richman Committed by GitHub

Add DiagnosticLevel used to filter how verbose toStringDeep output for (#11995)

Diagnostics object is.
parent 2d949ab6
...@@ -26,7 +26,8 @@ export 'package:flutter/foundation.dart' show ...@@ -26,7 +26,8 @@ export 'package:flutter/foundation.dart' show
VoidCallback, VoidCallback,
ValueChanged, ValueChanged,
ValueGetter, ValueGetter,
ValueSetter; ValueSetter,
DiagnosticLevel;
export 'package:vector_math/vector_math_64.dart' show Matrix4; export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'src/rendering/animated_size.dart'; export 'src/rendering/animated_size.dart';
......
...@@ -6,6 +6,63 @@ import 'package:meta/meta.dart'; ...@@ -6,6 +6,63 @@ import 'package:meta/meta.dart';
import 'print.dart'; import 'print.dart';
/// The various priority levels used to filter which diagnostics are shown and
/// omitted.
///
/// Trees of Flutter diagnostics can be very large so filtering the diagnostics
/// shown matters. Typically filtering to only show diagnostics with at least
/// level [debug] is appropriate.
enum DiagnosticLevel {
/// Diagnostics that should not be shown.
///
/// If a user chooses to display [hidden] diagnostics, they should not expect
/// the diagnostics to be formatted consistently with other diagnostics and
/// they should expect them to sometimes be be misleading. For example,
/// [FlagProperty] and [ObjectFlagProperty] have uglier formatting when the
/// property `value` does does not match a value with a custom flag
/// description. An example of a misleading diagnostic is a diagnostic for
/// a property that has no effect because some other property of the object is
/// set in a way that causes the hidden property to have no effect.
hidden,
/// A diagnostic that is likely to be low value but where the diagnostic
/// display is just as high quality as a diagnostic with a higher level.
///
/// Use this level for diagnostic properties that match their default value
/// and other cases where showing a diagnostic would not add much value such
/// as an [IterableProperty] where the value is empty.
fine,
/// Diagnostics that should only be shown when performing fine grained
/// debugging of an object.
///
/// Unlike a [fine] diagnostic, these diagnostics provide important
/// information about the object that is likely to be needed to debug. Used by
/// properties that are important but where the property value is too verbose
/// (e.g. 300+ characters long) to show with a higher diagnostic level.
debug,
/// Interesting diagnostics that should be typically shown.
info,
/// Very important diagnostics that indicate problematic property values.
///
/// For example, use if you would write the property description
/// message in ALL CAPS.
warning,
/// Diagnostics that indicate errors or unexpected conditions.
///
/// For example, use for property values where computing the value throws an
/// exception.
error,
/// Special level indicating that no diagnostics should be shown.
///
/// Do not specify this level for diagnostics. This level is only used to
/// filter which diagnostics are shown.
off,
}
/// Styles for displaying a node in a [DiagnosticsNode] tree. /// Styles for displaying a node in a [DiagnosticsNode] tree.
/// ///
/// See also: /// See also:
...@@ -577,7 +634,8 @@ const _NoDefaultValue kNoDefaultValue = const _NoDefaultValue(); ...@@ -577,7 +634,8 @@ const _NoDefaultValue kNoDefaultValue = const _NoDefaultValue();
abstract class DiagnosticsNode { abstract class DiagnosticsNode {
/// Initializes the object. /// Initializes the object.
/// ///
/// The [style], [showName] and [showSeparator] arguments must not be null. /// The [style], [showName], and [showSeparator] arguments must not
/// be null.
DiagnosticsNode({ DiagnosticsNode({
@required this.name, @required this.name,
this.style, this.style,
...@@ -594,7 +652,7 @@ abstract class DiagnosticsNode { ...@@ -594,7 +652,7 @@ abstract class DiagnosticsNode {
/// Diagnostics containing just a string `message` and not a concrete name or /// Diagnostics containing just a string `message` and not a concrete name or
/// value. /// value.
/// ///
/// The [style] argument must not be null. /// The [style] and [level] arguments must not be null.
/// ///
/// See also: /// See also:
/// ///
...@@ -603,14 +661,17 @@ abstract class DiagnosticsNode { ...@@ -603,14 +661,17 @@ abstract class DiagnosticsNode {
factory DiagnosticsNode.message( factory DiagnosticsNode.message(
String message, { String message, {
DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine, DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine,
DiagnosticLevel level: DiagnosticLevel.info,
}) { }) {
assert(style != null); assert(style != null);
assert(level != null);
return new DiagnosticsProperty<Null>( return new DiagnosticsProperty<Null>(
'', '',
null, null,
description: message, description: message,
style: style, style: style,
showName: false, showName: false,
level: level,
); );
} }
...@@ -634,9 +695,23 @@ abstract class DiagnosticsNode { ...@@ -634,9 +695,23 @@ abstract class DiagnosticsNode {
/// `:` is typically used as a separator when displaying as text. /// `:` is typically used as a separator when displaying as text.
final bool showSeparator; final bool showSeparator;
/// Whether the diagnostics should be hidden when showing the default /// Whether the diagnostic should be filtered due to its [level] being lower
/// view of a tree. /// than `minLevel`.
bool get hidden; ///
/// If `minLevel` is [DiagnosticLevel.hidden] no diagnostics will be filtered.
/// If `minLevel` is [DiagnosticsLevel.off] all diagnostics will be filtered.
bool isFiltered(DiagnosticLevel minLevel) => level.index < minLevel.index;
/// Priority level of the diagnostic used to control which diagnostics should
/// be shown and filtered.
///
/// Typically this only makes sense to set to a different value than
/// [DiagnosticLevel.info] for diagnostics representing properties. Some
/// subclasses have a `level` argument to their constructor which influences
/// the value returned here but other factors also influence it. For example,
/// whether an exception is thrown computing a property value
/// [DiagnosticLevel.error] is returned.
DiagnosticLevel get level => DiagnosticLevel.info;
/// Whether the name of the property should be shown when showing the default /// Whether the name of the property should be shown when showing the default
/// view of the tree. /// view of the tree.
...@@ -675,11 +750,18 @@ abstract class DiagnosticsNode { ...@@ -675,11 +750,18 @@ abstract class DiagnosticsNode {
/// `parentConfiguration` specifies how the parent is rendered as text art. /// `parentConfiguration` specifies how the parent is rendered as text art.
/// For example, if the parent places all properties on one line, the /// For example, if the parent places all properties on one line, the
/// [toString] for each property should avoid line breaks if possible. /// [toString] for each property should avoid line breaks if possible.
///
/// `minLevel` specifies the minimum [DiagnosticLevel] for properties included
/// in the output.
@override @override
String toString({ TextTreeConfiguration parentConfiguration }) { String toString({
TextTreeConfiguration parentConfiguration,
DiagnosticLevel minLevel: DiagnosticLevel.info,
}) {
assert(style != null); assert(style != null);
assert(minLevel != null);
if (style == DiagnosticsTreeStyle.singleLine) if (style == DiagnosticsTreeStyle.singleLine)
return toStringDeep(parentConfiguration: parentConfiguration); return toStringDeep(parentConfiguration: parentConfiguration, minLevel: minLevel);
final String description = toDescription(parentConfiguration: parentConfiguration); final String description = toDescription(parentConfiguration: parentConfiguration);
...@@ -728,8 +810,11 @@ abstract class DiagnosticsNode { ...@@ -728,8 +810,11 @@ abstract class DiagnosticsNode {
/// Returns a string representation of this node and its descendants. /// Returns a string representation of this node and its descendants.
/// ///
/// The [toStringDeep] method takes arguments, but those are intended for /// `minLevel` specifies the minimum [DiagnosticLevel] for properties included
/// internal use when recursing to the descendants, and so can be ignored. /// in the output.
///
/// The [toStringDeep] method takes other arguments, but those are intended
/// for internal use when recursing to the descendants, and so can be ignored.
/// ///
/// See also: /// See also:
/// ///
...@@ -740,7 +825,9 @@ abstract class DiagnosticsNode { ...@@ -740,7 +825,9 @@ abstract class DiagnosticsNode {
String prefixLineOne: '', String prefixLineOne: '',
String prefixOtherLines, String prefixOtherLines,
TextTreeConfiguration parentConfiguration, TextTreeConfiguration parentConfiguration,
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) { }) {
assert(minLevel != null);
prefixOtherLines ??= prefixLineOne; prefixOtherLines ??= prefixLineOne;
final List<DiagnosticsNode> children = getChildren(); final List<DiagnosticsNode> children = getChildren();
...@@ -770,7 +857,8 @@ abstract class DiagnosticsNode { ...@@ -770,7 +857,8 @@ abstract class DiagnosticsNode {
} }
final List<DiagnosticsNode> properties = final List<DiagnosticsNode> properties =
getProperties().where((DiagnosticsNode n) => !n.hidden).toList(); getProperties().where((DiagnosticsNode n) => !n.isFiltered(minLevel)).toList();
if (properties.isNotEmpty || children.isNotEmpty || emptyBodyDescription != null) if (properties.isNotEmpty || children.isNotEmpty || emptyBodyDescription != null)
builder.write(config.afterDescriptionIfBody); builder.write(config.afterDescriptionIfBody);
...@@ -803,11 +891,12 @@ abstract class DiagnosticsNode { ...@@ -803,11 +891,12 @@ abstract class DiagnosticsNode {
prefixLineOne: '${builder.prefixOtherLines}${propertyStyle.prefixLineOne}', prefixLineOne: '${builder.prefixOtherLines}${propertyStyle.prefixLineOne}',
prefixOtherLines: '${builder.prefixOtherLines}${propertyStyle.linkCharacter}${propertyStyle.prefixOtherLines}', prefixOtherLines: '${builder.prefixOtherLines}${propertyStyle.linkCharacter}${propertyStyle.prefixOtherLines}',
parentConfiguration: config, parentConfiguration: config,
minLevel: minLevel,
)); ));
continue; continue;
} }
assert(property.style == DiagnosticsTreeStyle.singleLine); assert(property.style == DiagnosticsTreeStyle.singleLine);
final String message = property.toString(parentConfiguration: config); final String message = property.toString(parentConfiguration: config, minLevel: minLevel);
if (!config.lineBreakProperties || message.length < kWrapWidth) { if (!config.lineBreakProperties || message.length < kWrapWidth) {
builder.write(message); builder.write(message);
} else { } else {
...@@ -857,6 +946,7 @@ abstract class DiagnosticsNode { ...@@ -857,6 +946,7 @@ abstract class DiagnosticsNode {
prefixLineOne: lastChildPrefixLineOne, prefixLineOne: lastChildPrefixLineOne,
prefixOtherLines: '$prefixChildren${childConfig.childLinkSpace}${childConfig.prefixOtherLines}', prefixOtherLines: '$prefixChildren${childConfig.childLinkSpace}${childConfig.prefixOtherLines}',
parentConfiguration: config, parentConfiguration: config,
minLevel: minLevel,
)); ));
if (childConfig.footer.isNotEmpty) if (childConfig.footer.isNotEmpty)
builder.writeRaw('$prefixChildren${childConfig.childLinkSpace}${childConfig.footer}'); builder.writeRaw('$prefixChildren${childConfig.childLinkSpace}${childConfig.footer}');
...@@ -864,7 +954,12 @@ abstract class DiagnosticsNode { ...@@ -864,7 +954,12 @@ abstract class DiagnosticsNode {
final TextTreeConfiguration nextChildStyle = _childTextConfiguration(children[i + 1], config); final TextTreeConfiguration nextChildStyle = _childTextConfiguration(children[i + 1], config);
final String childPrefixLineOne = '$prefixChildren${childConfig.prefixLineOne}'; final String childPrefixLineOne = '$prefixChildren${childConfig.prefixLineOne}';
final String childPrefixOtherLines ='$prefixChildren${nextChildStyle.linkCharacter}${childConfig.prefixOtherLines}'; final String childPrefixOtherLines ='$prefixChildren${nextChildStyle.linkCharacter}${childConfig.prefixOtherLines}';
builder.writeRawLine(child.toStringDeep(prefixLineOne: childPrefixLineOne, prefixOtherLines: childPrefixOtherLines)); builder.writeRawLine(child.toStringDeep(
prefixLineOne: childPrefixLineOne,
prefixOtherLines: childPrefixOtherLines,
parentConfiguration: config,
minLevel: minLevel,
));
if (childConfig.footer.isNotEmpty) if (childConfig.footer.isNotEmpty)
builder.writeRaw('$prefixChildren${nextChildStyle.linkCharacter}${childConfig.footer}'); builder.writeRaw('$prefixChildren${nextChildStyle.linkCharacter}${childConfig.footer}');
} }
...@@ -908,11 +1003,13 @@ class MessageProperty extends DiagnosticsProperty<Null> { ...@@ -908,11 +1003,13 @@ class MessageProperty extends DiagnosticsProperty<Null> {
/// Messages have no concrete [value] (so [value] will return null). The /// Messages have no concrete [value] (so [value] will return null). The
/// message is stored as the description. /// message is stored as the description.
/// ///
/// The [name] and `message` arguments must not be null. /// The [name], `message`, and [level] arguments must not be null.
MessageProperty(String name, String message) MessageProperty(String name, String message, {
: assert(name != null), DiagnosticLevel level : DiagnosticLevel.info,
}) : assert(name != null),
assert(message != null), assert(message != null),
super(name, null, description: message); assert(level != null),
super(name, null, description: message, level: level);
} }
/// Property which encloses its string [value] in quotes. /// Property which encloses its string [value] in quotes.
...@@ -924,25 +1021,25 @@ class MessageProperty extends DiagnosticsProperty<Null> { ...@@ -924,25 +1021,25 @@ class MessageProperty extends DiagnosticsProperty<Null> {
class StringProperty extends DiagnosticsProperty<String> { class StringProperty extends DiagnosticsProperty<String> {
/// Create a diagnostics property for strings. /// Create a diagnostics property for strings.
/// ///
/// The [showName], [hidden], and [quoted] arguments must not be null. /// The [showName], [quoted], and [level] arguments must not be null.
StringProperty(String name, String value, { StringProperty(String name, String value, {
String description, String description,
bool showName: true, bool showName: true,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
bool hidden: false,
this.quoted: true, this.quoted: true,
String ifEmpty, String ifEmpty,
DiagnosticLevel level : DiagnosticLevel. info,
}) : assert(showName != null), }) : assert(showName != null),
assert(hidden != null),
assert(quoted != null), assert(quoted != null),
assert(level != null),
super( super(
name, name,
value, value,
description: description, description: description,
defaultValue: defaultValue, defaultValue: defaultValue,
showName: showName, showName: showName,
hidden: hidden,
ifEmpty: ifEmpty, ifEmpty: ifEmpty,
level: level,
); );
/// Whether the description is enclosed in double quotes. /// Whether the description is enclosed in double quotes.
...@@ -974,38 +1071,38 @@ class StringProperty extends DiagnosticsProperty<String> { ...@@ -974,38 +1071,38 @@ class StringProperty extends DiagnosticsProperty<String> {
abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> { abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
_NumProperty(String name, _NumProperty(String name,
T value, { T value, {
bool hidden: false,
String ifNull, String ifNull,
this.unit, this.unit,
bool showName: true, bool showName: true,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
String tooltip, String tooltip,
DiagnosticLevel level: DiagnosticLevel.info,
}) : super( }) : super(
name, name,
value, value,
hidden: hidden,
ifNull: ifNull, ifNull: ifNull,
showName: showName, showName: showName,
defaultValue: defaultValue, defaultValue: defaultValue,
tooltip: tooltip, tooltip: tooltip,
level: level,
); );
_NumProperty.lazy(String name, _NumProperty.lazy(String name,
ComputePropertyValueCallback<T> computeValue, { ComputePropertyValueCallback<T> computeValue, {
bool hidden: false,
String ifNull, String ifNull,
this.unit, this.unit,
bool showName: true, bool showName: true,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
String tooltip, String tooltip,
DiagnosticLevel level: DiagnosticLevel.info,
}) : super.lazy( }) : super.lazy(
name, name,
computeValue, computeValue,
hidden: hidden,
ifNull: ifNull, ifNull: ifNull,
showName: showName, showName: showName,
defaultValue: defaultValue, defaultValue: defaultValue,
tooltip: tooltip, tooltip: tooltip,
level: level,
); );
...@@ -1032,44 +1129,54 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> { ...@@ -1032,44 +1129,54 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
/// Numeric formatting is optimized for debug message readability. /// Numeric formatting is optimized for debug message readability.
class DoubleProperty extends _NumProperty<double> { class DoubleProperty extends _NumProperty<double> {
/// If specified, [unit] describes the unit for the [value] (e.g. px). /// If specified, [unit] describes the unit for the [value] (e.g. px).
///
/// The [showName] and [level] arguments must not be null.
DoubleProperty(String name, double value, { DoubleProperty(String name, double value, {
bool hidden: false,
String ifNull, String ifNull,
String unit, String unit,
String tooltip, String tooltip,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
bool showName : true, bool showName : true,
}) : super( DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(showName != null),
assert(level != null),
super(
name, name,
value, value,
hidden: hidden,
ifNull: ifNull, ifNull: ifNull,
unit: unit, unit: unit,
tooltip: tooltip, tooltip: tooltip,
defaultValue: defaultValue, defaultValue: defaultValue,
showName: showName, showName: showName,
level: level,
); );
/// Property with a [value] that is computed only when needed. /// Property with a [value] that is computed only when needed.
/// ///
/// Use if computing the property [value] may throw an exception or is /// Use if computing the property [value] may throw an exception or is
/// expensive. /// expensive.
///
/// The [showName] and [level] arguments must not be null.
DoubleProperty.lazy( DoubleProperty.lazy(
String name, String name,
ComputePropertyValueCallback<double> computeValue, { ComputePropertyValueCallback<double> computeValue, {
bool hidden: false,
String ifNull, String ifNull,
bool showName: true,
String unit, String unit,
String tooltip, String tooltip,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
}) : super.lazy( DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(showName != null),
assert(level != null),
super.lazy(
name, name,
computeValue, computeValue,
hidden: hidden, showName: showName,
ifNull: ifNull, ifNull: ifNull,
unit: unit, unit: unit,
tooltip: tooltip, tooltip: tooltip,
defaultValue: defaultValue, defaultValue: defaultValue,
level: level,
); );
@override @override
...@@ -1082,15 +1189,15 @@ class DoubleProperty extends _NumProperty<double> { ...@@ -1082,15 +1189,15 @@ class DoubleProperty extends _NumProperty<double> {
class IntProperty extends _NumProperty<int> { class IntProperty extends _NumProperty<int> {
/// Create a diagnostics property for integers. /// Create a diagnostics property for integers.
/// ///
/// The [showName] and [hidden] arguments must not be null. /// The [showName] and [level] arguments must not be null.
IntProperty(String name, int value, { IntProperty(String name, int value, {
String ifNull, String ifNull,
bool showName: true, bool showName: true,
String unit, String unit,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
bool hidden: false, DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(showName != null), }) : assert(showName != null),
assert(hidden != null), assert(level != null),
super( super(
name, name,
value, value,
...@@ -1098,7 +1205,7 @@ class IntProperty extends _NumProperty<int> { ...@@ -1098,7 +1205,7 @@ class IntProperty extends _NumProperty<int> {
showName: showName, showName: showName,
unit: unit, unit: unit,
defaultValue: defaultValue, defaultValue: defaultValue,
hidden: hidden, level: level,
); );
@override @override
...@@ -1115,15 +1222,15 @@ class PercentProperty extends DoubleProperty { ...@@ -1115,15 +1222,15 @@ class PercentProperty extends DoubleProperty {
/// objects, as the fact that the property is shown as a percentage tends to /// objects, as the fact that the property is shown as a percentage tends to
/// be sufficient to disambiguate its meaning. /// be sufficient to disambiguate its meaning.
/// ///
/// The [showName] and [hidden] arguments must not be null. /// The [showName] and [level] arguments must not be null.
PercentProperty(String name, double fraction, { PercentProperty(String name, double fraction, {
String ifNull, String ifNull,
bool showName: true, bool showName: true,
String tooltip, String tooltip,
String unit, String unit,
bool hidden: false, DiagnosticLevel level : DiagnosticLevel.info,
}) : assert(showName != null), }) : assert(showName != null),
assert(hidden != null), assert(level != null),
super( super(
name, name,
fraction, fraction,
...@@ -1131,7 +1238,7 @@ class PercentProperty extends DoubleProperty { ...@@ -1131,7 +1238,7 @@ class PercentProperty extends DoubleProperty {
showName: showName, showName: showName,
tooltip: tooltip, tooltip: tooltip,
unit: unit, unit: unit,
hidden: hidden, level: level,
); );
@override @override
...@@ -1190,54 +1297,75 @@ class FlagProperty extends DiagnosticsProperty<bool> { ...@@ -1190,54 +1297,75 @@ class FlagProperty extends DiagnosticsProperty<bool> {
/// ///
/// [showName] defaults to false as typically [ifTrue] and [ifFalse] should /// [showName] defaults to false as typically [ifTrue] and [ifFalse] should
/// be descriptions that make the property name redundant. /// be descriptions that make the property name redundant.
///
/// The [showName] and [level] arguments must not be null.
FlagProperty(String name, { FlagProperty(String name, {
@required bool value, @required bool value,
this.ifTrue, this.ifTrue,
this.ifFalse, this.ifFalse,
bool showName: false, bool showName: false,
bool hidden: false,
Object defaultValue, Object defaultValue,
}) : super( DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(showName != null),
assert(level != null),
super(
name, name,
value, value,
showName: showName, showName: showName,
hidden: hidden,
defaultValue: defaultValue, defaultValue: defaultValue,
level: level,
) { ) {
assert(ifTrue != null || ifFalse != null); assert(ifTrue != null || ifFalse != null);
} }
/// Description to use if the property [value] is true. /// Description to use if the property [value] is true.
/// ///
/// If not specified and [value] equals true, the description is set to the /// If not specified and [value] equals true the property's priority [level]
/// empty string and the property is [hidden]. /// will be [DiagnosticLevel.hidden].
final String ifTrue; final String ifTrue;
/// Description to use if the property value is false. /// Description to use if the property value is false.
/// ///
/// If not specified and [value] equals false, the description is set to the /// If not specified and [value] equals false, the property's priority [level]
/// empty string and the property is [hidden]. /// will be [DiagnosticLevel.hidden].
final String ifFalse; final String ifFalse;
@override @override
String valueToString({ TextTreeConfiguration parentConfiguration }) { String valueToString({ TextTreeConfiguration parentConfiguration }) {
if (value == true) if (value == true) {
return ifTrue ?? ''; if (ifTrue != null)
if (value == false) return ifTrue;
return ifFalse ?? ''; } else if (value == false) {
return ''; if (ifFalse != null)
return ifFalse;
}
return super.valueToString(parentConfiguration: parentConfiguration);
} }
@override @override
bool get hidden { bool get showName {
if (_hidden || value == defaultValue) if (value == null || (value == true && ifTrue == null) || (value == false && ifFalse == null)) {
return true; // We are missing a description for the flag value so we need to show the
if (value == true) // flag name. The property will have DiagnosticLevel.hidden for this case
return ifTrue == null; // so users will not see this the property in this case unless they are
if (value == false) // displaying hidden properties.
return ifFalse == null;
return true; return true;
} }
return super.showName;
}
@override
DiagnosticLevel get level {
if (value == true) {
if (ifTrue == null)
return DiagnosticLevel.hidden;
}
if (value == false) {
if (ifFalse == null)
return DiagnosticLevel.hidden;
}
return super.level;
}
} }
/// Property with an `Iterable<T>` [value] that can be displayed with /// Property with an `Iterable<T>` [value] that can be displayed with
...@@ -1249,22 +1377,23 @@ class FlagProperty extends DiagnosticsProperty<bool> { ...@@ -1249,22 +1377,23 @@ class FlagProperty extends DiagnosticsProperty<bool> {
class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
/// Create a diagnostics property for iterables (e.g. lists). /// Create a diagnostics property for iterables (e.g. lists).
/// ///
/// The [ifEmpty] argument must not be null, as otherwise an iterable /// The [ifEmpty] argument is used to indicate how an iterable [value] with 0
/// value with 0 elements would, confusingly, be displayed as the empty /// elements is displayed. If [ifEmpty] equals `null` that indicates that an
/// string. It defaults to the string `[]`. /// empty iterable [value] is not interesting to display similar to how
/// [defaultValue] is used to indicate that a specific concrete value is not
/// interesting to display.
/// ///
/// The [style], [hidden], and [showName] arguments must also not be null. /// The [style], [showName], and [level] arguments must not be null.
IterableProperty(String name, Iterable<T> value, { IterableProperty(String name, Iterable<T> value, {
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
String ifNull, String ifNull,
String ifEmpty: '[]', String ifEmpty: '[]',
DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine, DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine,
bool hidden: false,
bool showName: true, bool showName: true,
}) : assert(ifEmpty != null), DiagnosticLevel level: DiagnosticLevel.info,
assert(style != null), }) : assert(style != null),
assert(hidden != null),
assert(showName != null), assert(showName != null),
assert(level != null),
super( super(
name, name,
value, value,
...@@ -1272,8 +1401,8 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { ...@@ -1272,8 +1401,8 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
ifNull: ifNull, ifNull: ifNull,
ifEmpty: ifEmpty, ifEmpty: ifEmpty,
style: style, style: style,
hidden: hidden,
showName: showName, showName: showName,
level: level,
); );
@override @override
...@@ -1281,6 +1410,9 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { ...@@ -1281,6 +1410,9 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
if (value == null) if (value == null)
return value.toString(); return value.toString();
if (value.isEmpty)
return ifEmpty ?? '[]';
if (parentConfiguration != null && !parentConfiguration.lineBreakProperties) { if (parentConfiguration != null && !parentConfiguration.lineBreakProperties) {
// Always display the value as a single line and enclose the iterable // Always display the value as a single line and enclose the iterable
// value in brackets to avoid ambiguity. // value in brackets to avoid ambiguity.
...@@ -1289,6 +1421,20 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { ...@@ -1289,6 +1421,20 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
return value.join(style == DiagnosticsTreeStyle.singleLine ? ', ' : '\n'); return value.join(style == DiagnosticsTreeStyle.singleLine ? ', ' : '\n');
} }
/// Priority level of the diagnostic used to control which diagnostics should
/// be shown and filtered.
///
/// If [ifEmpty] is `null` and the [value] is an empty [Iterable] then level
/// [DiagnosticLevel.fine] is returned in a similar way to how an
/// [ObjectFlagProperty] handles when [ifNull] is `null` and the [value] is
/// `null`.
@override
DiagnosticLevel get level {
if (ifEmpty == null && value != null && value.isEmpty && super.level != DiagnosticLevel.hidden)
return DiagnosticLevel.fine;
return super.level;
}
} }
/// An property than displays enum values tersely. /// An property than displays enum values tersely.
...@@ -1303,15 +1449,16 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> { ...@@ -1303,15 +1449,16 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
class EnumProperty<T> extends DiagnosticsProperty<T> { class EnumProperty<T> extends DiagnosticsProperty<T> {
/// Create a diagnostics property that displays an enum. /// Create a diagnostics property that displays an enum.
/// ///
/// The [hidden] argument must not be null. /// The [level] argument must also not be null.
EnumProperty(String name, T value, { EnumProperty(String name, T value, {
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
bool hidden: false, DiagnosticLevel level : DiagnosticLevel.info,
}) : super ( }) : assert(level != null),
super (
name, name,
value, value,
defaultValue: defaultValue, defaultValue: defaultValue,
hidden: hidden, level: level,
); );
@override @override
...@@ -1328,8 +1475,8 @@ class EnumProperty<T> extends DiagnosticsProperty<T> { ...@@ -1328,8 +1475,8 @@ class EnumProperty<T> extends DiagnosticsProperty<T> {
/// ///
/// The [ifPresent] and [ifNull] strings describe the property [value] when it /// The [ifPresent] and [ifNull] strings describe the property [value] when it
/// is non-null and null respectively. If one of [ifPresent] or [ifNull] is /// is non-null and null respectively. If one of [ifPresent] or [ifNull] is
/// omitted, that is taken to mean that [hidden] should be true when [value] is /// omitted, that is taken to mean that [level] should be
/// non-null or null respectively. /// [DiagnosticsLevel.hidden] when [value] is non-null or null respectively.
/// ///
/// This kind of diagnostics property is typically used for values mostly opaque /// This kind of diagnostics property is typically used for values mostly opaque
/// values, like closures, where presenting the actual object is of dubious /// values, like closures, where presenting the actual object is of dubious
...@@ -1345,59 +1492,86 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> { ...@@ -1345,59 +1492,86 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
/// absent (null), but for which the exact value's [Object.toString] /// absent (null), but for which the exact value's [Object.toString]
/// representation is not very transparent (e.g. a callback). /// representation is not very transparent (e.g. a callback).
/// ///
/// The [showName] and [hidden] arguments must not be null. Additionally, at /// The [showName] and [level] arguments must not be null. Additionally, at
/// least one of [ifPresent] and [ifNull] must not be null. /// least one of [ifPresent] and [ifNull] must not be null.
ObjectFlagProperty(String name, T value, { ObjectFlagProperty(String name, T value, {
this.ifPresent, this.ifPresent,
String ifNull, String ifNull,
bool showName: false, bool showName: false,
bool hidden: false, DiagnosticLevel level : DiagnosticLevel.info,
}) : assert(ifPresent != null || ifNull != null), }) : assert(ifPresent != null || ifNull != null),
assert(showName != null), assert(showName != null),
assert(hidden != null), assert(level != null),
super( super(
name, name,
value, value,
showName: showName, showName: showName,
hidden: hidden,
ifNull: ifNull, ifNull: ifNull,
level: level,
); );
/// Shorthand constructor to describe whether the property has a value. /// Shorthand constructor to describe whether the property has a value.
/// ///
/// Only use if prefixing the property name with the word 'has' is a good /// Only use if prefixing the property name with the word 'has' is a good
/// flag name. /// flag name.
///
/// The [name] and [level] arguments must not be null.
ObjectFlagProperty.has( ObjectFlagProperty.has(
String name, String name,
T value, T value, {
) : ifPresent = 'has $name', DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(name != null),
assert(level != null),
ifPresent = 'has $name',
super( super(
name, name,
value, value,
showName: false, showName: false,
level: level,
); );
/// Description to use if the property [value] is not null. /// Description to use if the property [value] is not null.
/// ///
/// If the property [value] is not null and [ifPresent] is null, the /// If the property [value] is not null and [ifPresent] is null, the
/// description returns the empty string and the property is [hidden]. /// [level] for the property is [DiagnosticsLevel.hidden] and the description
/// from superclass is used.
final String ifPresent; final String ifPresent;
@override @override
String valueToString({ TextTreeConfiguration parentConfiguration }) { String valueToString({ TextTreeConfiguration parentConfiguration }) {
if (value != null) if (value != null) {
return ifPresent ?? ''; if (ifPresent != null)
return ifPresent;
return ifNull ?? ''; } else {
if (ifNull != null)
return ifNull;
}
return super.valueToString(parentConfiguration: parentConfiguration);
} }
@override @override
bool get hidden { bool get showName {
if (super.hidden) if ((value != null && ifPresent == null) || (value == null && ifNull == null)) {
// We are missing a description for the flag value so we need to show the
// flag name. The property will have DiagnosticLevel.hidden for this case
// so users will not see this the property in this case unless they are
// displaying hidden properties.
return true; return true;
if (value != null) }
return ifPresent == null; return super.showName;
return ifNull == null; }
@override
DiagnosticLevel get level {
if (value != null) {
if (ifPresent == null)
return DiagnosticLevel.hidden;
} else {
if (ifNull == null)
return DiagnosticLevel.hidden;
}
return super.level;
} }
} }
...@@ -1413,36 +1587,41 @@ typedef T ComputePropertyValueCallback<T>(); ...@@ -1413,36 +1587,41 @@ typedef T ComputePropertyValueCallback<T>();
/// If the default `value.toString()` does not provide an adequate description /// If the default `value.toString()` does not provide an adequate description
/// of the value, specify `description` defining a custom description. /// of the value, specify `description` defining a custom description.
/// ///
/// The [hidden] property specifies whether the property should be hidden from
/// the default output (e.g. the output given by [toStringDeep]).
///
/// The [showSeparator] property indicates whether a separator should be placed /// The [showSeparator] property indicates whether a separator should be placed
/// between the property [name] and its [value]. /// between the property [name] and its [value].
class DiagnosticsProperty<T> extends DiagnosticsNode { class DiagnosticsProperty<T> extends DiagnosticsNode {
/// Create a diagnostics property. /// Create a diagnostics property.
/// ///
/// The [hidden], [showName], [showSeparator], and [style] arguments must not be null. /// The [showName], [showSeparator], [style], [missingIfNull], and [level]
/// arguments must not be null.
///
/// The [level] argument is just a suggestion and can be overridden if
/// something else about the property causes it to have a lower or higher
/// level. For example, if the property value is `null` and [missingIfNull] is
/// `true`, [level] is raised to [DiagnosticLevel.warning].
DiagnosticsProperty( DiagnosticsProperty(
String name, String name,
T value, { T value, {
String description, String description,
bool hidden: false, String ifNull,
this.ifNull,
this.ifEmpty, this.ifEmpty,
bool showName: true, bool showName: true,
bool showSeparator: true, bool showSeparator: true,
this.defaultValue: kNoDefaultValue, this.defaultValue: kNoDefaultValue,
this.tooltip, this.tooltip,
this.missingIfNull: false,
DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine, DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine,
}) : assert(hidden != null), DiagnosticLevel level: DiagnosticLevel.info,
assert(showName != null), }) : assert(showName != null),
assert(showSeparator != null), assert(showSeparator != null),
assert(style != null), assert(style != null),
assert(level != null),
_description = description, _description = description,
_valueComputed = true, _valueComputed = true,
_value = value, _value = value,
_computeValue = null, _computeValue = null,
_hidden = hidden, ifNull = ifNull ?? (missingIfNull ? 'MISSING' : null),
_defaultLevel = level,
super( super(
name: name, name: name,
showName: showName, showName: showName,
...@@ -1455,30 +1634,38 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -1455,30 +1634,38 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// Use if computing the property [value] may throw an exception or is /// Use if computing the property [value] may throw an exception or is
/// expensive. /// expensive.
/// ///
/// The [hidden], [showName], [showSeparator], and [style] arguments must not /// The [showName], [showSeparator], [style], [missingIfNull], and [level]
/// be null. /// arguments must not be null.
///
/// The [level] argument is just a suggestion and can be overridden if
/// if something else about the property causes it to have a lower or higher
/// level. For example, if calling `computeValue` throws an exception, [level]
/// will always return [DiagnosticLevel.error].
DiagnosticsProperty.lazy( DiagnosticsProperty.lazy(
String name, String name,
ComputePropertyValueCallback<T> computeValue, { ComputePropertyValueCallback<T> computeValue, {
String description, String description,
bool hidden: false, String ifNull,
this.ifNull,
this.ifEmpty, this.ifEmpty,
bool showName: true, bool showName: true,
bool showSeparator: true, bool showSeparator: true,
this.defaultValue: kNoDefaultValue, this.defaultValue: kNoDefaultValue,
this.tooltip, this.tooltip,
this.missingIfNull: false,
DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine, DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine,
}) : assert(hidden != null), DiagnosticLevel level: DiagnosticLevel.info,
assert(showName != null), }) : assert(showName != null),
assert(showSeparator != null), assert(showSeparator != null),
assert(defaultValue == kNoDefaultValue || defaultValue is T), assert(defaultValue == kNoDefaultValue || defaultValue is T),
assert(missingIfNull != null),
assert(style != null), assert(style != null),
assert(level != null),
_description = description, _description = description,
_valueComputed = false, _valueComputed = false,
_value = null, _value = null,
_computeValue = computeValue, _computeValue = computeValue,
_hidden = hidden, _defaultLevel = level,
ifNull = ifNull ?? (missingIfNull ? 'MISSING' : null),
super( super(
name: name, name: name,
showName: showName, showName: showName,
...@@ -1550,6 +1737,10 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -1550,6 +1737,10 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// generating the string description. /// generating the string description.
final String tooltip; final String tooltip;
/// Whether a [value] of null causes the property to have [level]
/// [DiagnosticLevel.warning] warning that the property is missing a [value].
final bool missingIfNull;
/// The type of the property [value]. /// The type of the property [value].
/// ///
/// This is determined from the type argument `T` used to instantiate the /// This is determined from the type argument `T` used to instantiate the
...@@ -1607,29 +1798,41 @@ class DiagnosticsProperty<T> extends DiagnosticsNode { ...@@ -1607,29 +1798,41 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
} }
} }
/// If the [value] of the property equals [defaultValue] the property is /// If the [value] of the property equals [defaultValue] the priority [level]
/// [hidden] as the [value] is uninteresting. /// of the property is downgraded to [DiagnosticLevel.fine] as the property
/// value is uninteresting.
/// ///
/// [defaultValue] has type [T] or is [kNoDefaultValue]. /// [defaultValue] has type [T] or is [kNoDefaultValue].
final Object defaultValue; final Object defaultValue;
final bool _hidden; DiagnosticLevel _defaultLevel;
/// Whether the property should be hidden when showing the default /// Priority level of the diagnostic used to control which diagnostics should
/// view of a tree. /// be shown and filtered.
/// ///
/// This could be set to true (hiding the property) if another property /// The property level defaults to the value specified by the `level`
/// provides a normally more useful summary of the value. /// constructor argument. The level is raised to [DiagnosticLevel.error] if
/// an [exception] was thrown getting the property [value]. The level is
/// raised to [DiagnosticLevel.warning] if the property [value] is null and
/// the property is not allowed to be null due to [missingIfNull]. The
/// priority level is lowered to [DiagnosticLevel.fine] if the property
/// [value] equals [defaultValue].
@override @override
bool get hidden { DiagnosticLevel get level {
if (_hidden) if (_defaultLevel == DiagnosticLevel.hidden)
return true; return _defaultLevel;
if (defaultValue != kNoDefaultValue) {
if (exception != null) if (exception != null)
return false; return DiagnosticLevel.error;
return value == defaultValue;
} if (value == null && missingIfNull)
return false; return DiagnosticLevel.warning;
// Use a low level when the value matches the default value.
if (defaultValue != kNoDefaultValue && value == defaultValue)
return DiagnosticLevel.fine;
return _defaultLevel;
} }
final ComputePropertyValueCallback<T> _computeValue; final ComputePropertyValueCallback<T> _computeValue;
...@@ -1690,8 +1893,6 @@ class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode { ...@@ -1690,8 +1893,6 @@ class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode {
String toDescription({ TextTreeConfiguration parentConfiguration }) { String toDescription({ TextTreeConfiguration parentConfiguration }) {
return value.toStringShort(); return value.toStringShort();
} }
@override bool get hidden => false;
} }
/// [DiagnosticsNode] for an instance of [DiagnosticableTree]. /// [DiagnosticsNode] for an instance of [DiagnosticableTree].
...@@ -1839,8 +2040,9 @@ abstract class Diagnosticable { ...@@ -1839,8 +2040,9 @@ abstract class Diagnosticable {
/// * [toString], for a detailed description of the object. /// * [toString], for a detailed description of the object.
String toStringShort() => describeIdentity(this); String toStringShort() => describeIdentity(this);
@override String toString() { @override
return toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(); String toString({ DiagnosticLevel minLevel: DiagnosticLevel.debug }) {
return toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(minLevel: minLevel);
} }
/// Returns a debug representation of the object that is used by debugging /// Returns a debug representation of the object that is used by debugging
...@@ -1870,14 +2072,14 @@ abstract class Diagnosticable { ...@@ -1870,14 +2072,14 @@ abstract class Diagnosticable {
/// Common named parameters in [DiagnosticsNode] subclasses help filter when /// Common named parameters in [DiagnosticsNode] subclasses help filter when
/// and how properties are displayed. /// and how properties are displayed.
/// ///
/// `defaultValue`, `showName`, `showSeparator`, and `hidden` keep string /// `defaultValue`, `showName`, `showSeparator`, and `level` keep string
/// representations of diagnostics terse and hide properties when they are not /// representations of diagnostics terse and hide properties when they are not
/// very useful. /// very useful.
/// ///
/// * Use `defaultValue` any time the default value of a property is /// * Use `defaultValue` any time the default value of a property is
/// uninteresting. For example, specify a default value of null any time /// uninteresting. For example, specify a default value of null any time
/// a property being null does not indicate an error. /// a property being null does not indicate an error.
/// * Avoid specifying the `hidden` parameter unless the result you want /// * Avoid specifying the `level` parameter unless the result you want
/// cannot be be achieved by using the `defaultValue` parameter or using /// cannot be be achieved by using the `defaultValue` parameter or using
/// the [ObjectFlagProperty] class to conditionally display the property /// the [ObjectFlagProperty] class to conditionally display the property
/// as a flag. /// as a flag.
...@@ -2091,39 +2293,52 @@ abstract class DiagnosticableTree extends Diagnosticable { ...@@ -2091,39 +2293,52 @@ abstract class DiagnosticableTree extends Diagnosticable {
/// This description is often somewhat long. This includes the same /// This description is often somewhat long. This includes the same
/// information given by [toStringDeep], but does not recurse to any children. /// information given by [toStringDeep], but does not recurse to any children.
/// ///
/// The [toStringShallow] method can take an argument, which is the string to /// `joiner` specifies the string which is place between each part obtained
/// place between each part obtained from [debugFillProperties]. Passing a /// from [debugFillProperties]. Passing a string such as `'\n '` will result
/// string such as `'\n '` will result in a multiline string that indents the /// in a multiline string that indents the properties of the object below its
/// properties of the object below its name (as per [toString]). /// name (as per [toString]).
///
/// `minLevel` specifies the minimum [DiagnosticLevel] for properties included
/// in the output.
/// ///
/// See also: /// See also:
/// ///
/// * [toString], for a brief description of the object. /// * [toString], for a brief description of the object.
/// * [toStringDeep], for a description of the subtree rooted at this object. /// * [toStringDeep], for a description of the subtree rooted at this object.
String toStringShallow([String joiner = ', ']) { String toStringShallow({
String joiner: ', ',
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
final StringBuffer result = new StringBuffer(); final StringBuffer result = new StringBuffer();
result.write(toString()); result.write(toString());
result.write(joiner); result.write(joiner);
final DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder();
debugFillProperties(builder); debugFillProperties(builder);
result.write( result.write(
builder.properties.where((DiagnosticsNode n) => !n.hidden).join(joiner), builder.properties.where((DiagnosticsNode n) => !n.isFiltered(minLevel)).join(joiner),
); );
return result.toString(); return result.toString();
} }
/// Returns a string representation of this node and its descendants. /// Returns a string representation of this node and its descendants.
/// ///
/// The [toStringDeep] method takes arguments, but those are intended for /// `minLevel` specifies the minimum [DiagnosticLevel] for properties included
/// internal use when recursing to the descendants, and so can be ignored. /// in the output.
///
/// The [toStringDeep] method takes other arguments, but those are intended
/// for internal use when recursing to the descendants, and so can be ignored.
/// ///
/// See also: /// See also:
/// ///
/// * [toString], for a brief description of the object but not its children. /// * [toString], for a brief description of the object but not its children.
/// * [toStringShallow], for a detailed description of the object but not its /// * [toStringShallow], for a detailed description of the object but not its
/// children. /// children.
String toStringDeep({ String prefixLineOne: '', String prefixOtherLines }) { String toStringDeep({
return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines); String prefixLineOne: '',
String prefixOtherLines,
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines, minLevel: minLevel);
} }
@override @override
...@@ -2170,26 +2385,33 @@ abstract class DiagnosticableTreeMixin implements DiagnosticableTree { ...@@ -2170,26 +2385,33 @@ abstract class DiagnosticableTreeMixin implements DiagnosticableTree {
factory DiagnosticableTreeMixin._() => null; factory DiagnosticableTreeMixin._() => null;
@override @override
String toString() { String toString({ DiagnosticLevel minLevel: DiagnosticLevel.debug }) {
return toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(); return toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(minLevel: minLevel);
} }
@override @override
String toStringShallow([String joiner = ', ']) { String toStringShallow({
String joiner: ', ',
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
final StringBuffer result = new StringBuffer(); final StringBuffer result = new StringBuffer();
result.write(toStringShort()); result.write(toStringShort());
result.write(joiner); result.write(joiner);
final DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder();
debugFillProperties(builder); debugFillProperties(builder);
result.write( result.write(
builder.properties.where((DiagnosticsNode n) => !n.hidden).join(joiner), builder.properties.where((DiagnosticsNode n) => !n.isFiltered(minLevel)).join(joiner),
); );
return result.toString(); return result.toString();
} }
@override @override
String toStringDeep({ String prefixLineOne: '', String prefixOtherLines }) { String toStringDeep({
return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines); String prefixLineOne: '',
String prefixOtherLines,
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines, minLevel: minLevel);
} }
@override @override
......
...@@ -234,7 +234,7 @@ class InkResponse extends StatefulWidget { ...@@ -234,7 +234,7 @@ class InkResponse extends StatefulWidget {
if (gestures.isEmpty) if (gestures.isEmpty)
gestures.add('<none>'); gestures.add('<none>');
description.add(new IterableProperty<String>('gestures', gestures)); description.add(new IterableProperty<String>('gestures', gestures));
description.add(new DiagnosticsProperty<bool>('containedInkWell', containedInkWell, hidden: true)); description.add(new DiagnosticsProperty<bool>('containedInkWell', containedInkWell, level: DiagnosticLevel.fine));
description.add(new DiagnosticsProperty<BoxShape>( description.add(new DiagnosticsProperty<BoxShape>(
'highlightShape', 'highlightShape',
highlightShape, highlightShape,
......
...@@ -521,7 +521,7 @@ class TextStyle extends Diagnosticable { ...@@ -521,7 +521,7 @@ class TextStyle extends Diagnosticable {
// Hide decorationColor from the default text view as it is shown in the // Hide decorationColor from the default text view as it is shown in the
// terse decoration summary as well. // terse decoration summary as well.
styles.add(new DiagnosticsProperty<Color>('${prefix}decorationColor', decorationColor, defaultValue: null, hidden: true)); styles.add(new DiagnosticsProperty<Color>('${prefix}decorationColor', decorationColor, defaultValue: null, level: DiagnosticLevel.fine));
if (decorationColor != null) if (decorationColor != null)
decorationDescription.add('$decorationColor'); decorationDescription.add('$decorationColor');
...@@ -529,15 +529,15 @@ class TextStyle extends Diagnosticable { ...@@ -529,15 +529,15 @@ class TextStyle extends Diagnosticable {
// Intentionally collide with the property 'decoration' added below. // Intentionally collide with the property 'decoration' added below.
// Tools that show hidden properties could choose the first property // Tools that show hidden properties could choose the first property
// matching the name to disambiguate. // matching the name to disambiguate.
styles.add(new DiagnosticsProperty<TextDecoration>('${prefix}decoration', decoration, defaultValue: null, hidden: true)); styles.add(new DiagnosticsProperty<TextDecoration>('${prefix}decoration', decoration, defaultValue: null, level: DiagnosticLevel.hidden));
if (decoration != null) if (decoration != null)
decorationDescription.add('$decoration'); decorationDescription.add('$decoration');
assert(decorationDescription.isNotEmpty); assert(decorationDescription.isNotEmpty);
styles.add(new MessageProperty('${prefix}decoration', decorationDescription.join(' '))); styles.add(new MessageProperty('${prefix}decoration', decorationDescription.join(' ')));
} }
final bool styleSpecified = styles.any((DiagnosticsNode n) => !n.hidden); final bool styleSpecified = styles.any((DiagnosticsNode n) => !n.isFiltered(DiagnosticLevel.info));
properties.add(new DiagnosticsProperty<bool>('${prefix}inherit', inherit, hidden: !styleSpecified && inherit)); properties.add(new DiagnosticsProperty<bool>('${prefix}inherit', inherit, level: (!styleSpecified && inherit) ? DiagnosticLevel.fine : DiagnosticLevel.info));
for (DiagnosticsNode style in styles) for (DiagnosticsNode style in styles)
properties.add(style); properties.add(style);
......
...@@ -1667,7 +1667,7 @@ abstract class RenderBox extends RenderObject { ...@@ -1667,7 +1667,7 @@ abstract class RenderBox extends RenderObject {
node = node.parent; node = node.parent;
information.writeln('The nearest ancestor providing an unbounded width constraint is:'); information.writeln('The nearest ancestor providing an unbounded width constraint is:');
information.write(' '); information.write(' ');
information.writeln(node.toStringShallow('\n ')); information.writeln(node.toStringShallow(joiner: '\n '));
} }
if (!constraints.hasBoundedHeight) { if (!constraints.hasBoundedHeight) {
RenderBox node = this; RenderBox node = this;
...@@ -1675,7 +1675,7 @@ abstract class RenderBox extends RenderObject { ...@@ -1675,7 +1675,7 @@ abstract class RenderBox extends RenderObject {
node = node.parent; node = node.parent;
information.writeln('The nearest ancestor providing an unbounded height constraint is:'); information.writeln('The nearest ancestor providing an unbounded height constraint is:');
information.write(' '); information.write(' ');
information.writeln(node.toStringShallow('\n ')); information.writeln(node.toStringShallow(joiner: '\n '));
} }
throw new FlutterError( throw new FlutterError(
...@@ -2090,7 +2090,7 @@ abstract class RenderBox extends RenderObject { ...@@ -2090,7 +2090,7 @@ abstract class RenderBox extends RenderObject {
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder description) { void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description); super.debugFillProperties(description);
description.add(new DiagnosticsProperty<Size>('size', _size, ifNull: 'MISSING')); description.add(new DiagnosticsProperty<Size>('size', _size, missingIfNull: true));
} }
} }
......
...@@ -146,15 +146,19 @@ List<String> debugDescribeTransform(Matrix4 transform) { ...@@ -146,15 +146,19 @@ List<String> debugDescribeTransform(Matrix4 transform) {
class TransformProperty extends DiagnosticsProperty<Matrix4> { class TransformProperty extends DiagnosticsProperty<Matrix4> {
/// Create a diagnostics property for [Matrix4] objects. /// Create a diagnostics property for [Matrix4] objects.
/// ///
/// The [showName] argument must not be null. /// The [showName] and [level] arguments must not be null.
TransformProperty(String name, Matrix4 value, { TransformProperty(String name, Matrix4 value, {
bool showName: true, bool showName: true,
Object defaultValue: kNoDefaultValue, Object defaultValue: kNoDefaultValue,
}) : assert(showName != null), super( DiagnosticLevel level: DiagnosticLevel.info,
}) : assert(showName != null),
assert(level != null),
super(
name, name,
value, value,
showName: showName, showName: showName,
defaultValue: defaultValue, defaultValue: defaultValue,
level: level,
); );
@override @override
......
...@@ -677,7 +677,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl ...@@ -677,7 +677,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
if (node != null) { if (node != null) {
information.writeln('The nearest ancestor providing an unbounded width constraint is:'); information.writeln('The nearest ancestor providing an unbounded width constraint is:');
information.write(' '); information.write(' ');
information.write(node.toStringShallow('\n ')); information.write(node.toStringShallow(joiner: '\n '));
} }
information.writeln('See also: https://flutter.io/layout/'); information.writeln('See also: https://flutter.io/layout/');
addendum = information.toString(); addendum = information.toString();
......
...@@ -107,8 +107,8 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin { ...@@ -107,8 +107,8 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder description) { void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description); super.debugFillProperties(description);
description.add(new DiagnosticsProperty<Object>('owner', owner, hidden: parent != null, defaultValue: null)); description.add(new DiagnosticsProperty<Object>('owner', owner, level: parent != null ? DiagnosticLevel.hidden : DiagnosticLevel.info, defaultValue: null));
description.add(new DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null)); description.add(new DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null, level: DiagnosticLevel.debug));
} }
} }
......
...@@ -1470,7 +1470,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -1470,7 +1470,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
renderObject: this, renderObject: this,
informationCollector: (StringBuffer information) { informationCollector: (StringBuffer information) {
information.writeln('The following RenderObject was being processed when the exception was fired:'); information.writeln('The following RenderObject was being processed when the exception was fired:');
information.writeln(' ${toStringShallow('\n ')}'); information.writeln(' ${toStringShallow(joiner: '\n ')}');
final List<String> descendants = <String>[]; final List<String> descendants = <String>[];
const int maxDepth = 5; const int maxDepth = 5;
int depth = 0; int depth = 0;
...@@ -2326,7 +2326,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2326,7 +2326,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
'Tried to paint a RenderObject reentrantly.\n' 'Tried to paint a RenderObject reentrantly.\n'
'The following RenderObject was already being painted when it was ' 'The following RenderObject was already being painted when it was '
'painted again:\n' 'painted again:\n'
' ${toStringShallow("\n ")}\n' ' ${toStringShallow(joiner: "\n ")}\n'
'Since this typically indicates an infinite recursion, it is ' 'Since this typically indicates an infinite recursion, it is '
'disallowed.' 'disallowed.'
); );
...@@ -2349,7 +2349,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2349,7 +2349,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
'updated.\n' 'updated.\n'
'The following RenderObject was marked as having dirty compositing ' 'The following RenderObject was marked as having dirty compositing '
'bits at the time that it was painted:\n' 'bits at the time that it was painted:\n'
' ${toStringShallow("\n ")}\n' ' ${toStringShallow(joiner: "\n ")}\n'
'A RenderObject that still has dirty compositing bits cannot be ' 'A RenderObject that still has dirty compositing bits cannot be '
'painted because this indicates that the tree has not yet been ' 'painted because this indicates that the tree has not yet been '
'properly configured for creating the layer tree.\n' 'properly configured for creating the layer tree.\n'
...@@ -2840,17 +2840,25 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2840,17 +2840,25 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
} }
@override @override
String toString() => toStringShort(); String toString({ DiagnosticLevel minLevel }) => toStringShort();
/// Returns a description of the tree rooted at this node. /// Returns a description of the tree rooted at this node.
/// If the prefix argument is provided, then every line in the output /// If the prefix argument is provided, then every line in the output
/// will be prefixed by that string. /// will be prefixed by that string.
@override @override
String toStringDeep({ String prefixLineOne: '', String prefixOtherLines: '' }) { String toStringDeep({
String prefixLineOne: '',
String prefixOtherLines: '',
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
final RenderObject debugPreviousActiveLayout = _debugActiveLayout; final RenderObject debugPreviousActiveLayout = _debugActiveLayout;
_debugActiveLayout = null; _debugActiveLayout = null;
final String result = super.toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines); final String result = super.toStringDeep(
prefixLineOne: prefixLineOne,
prefixOtherLines: prefixOtherLines,
minLevel: minLevel,
);
_debugActiveLayout = debugPreviousActiveLayout; _debugActiveLayout = debugPreviousActiveLayout;
return result; return result;
...@@ -2862,10 +2870,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2862,10 +2870,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// This includes the same information for this RenderObject as given by /// This includes the same information for this RenderObject as given by
/// [toStringDeep], but does not recurse to any children. /// [toStringDeep], but does not recurse to any children.
@override @override
String toStringShallow([String joiner = '; ']) { String toStringShallow({
String joiner: '; ',
DiagnosticLevel minLevel: DiagnosticLevel.debug,
}) {
final RenderObject debugPreviousActiveLayout = _debugActiveLayout; final RenderObject debugPreviousActiveLayout = _debugActiveLayout;
_debugActiveLayout = null; _debugActiveLayout = null;
final String result = super.toStringShallow(joiner); final String result = super.toStringShallow(joiner: joiner, minLevel: minLevel);
_debugActiveLayout = debugPreviousActiveLayout; _debugActiveLayout = debugPreviousActiveLayout;
return result; return result;
} }
...@@ -2873,9 +2884,9 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2873,9 +2884,9 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
@protected @protected
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder description) { void debugFillProperties(DiagnosticPropertiesBuilder description) {
description.add(new DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null)); description.add(new DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null, level: DiagnosticLevel.debug));
description.add(new DiagnosticsProperty<ParentData>('parentData', parentData, tooltip: _debugCanParentUseSize == true ? 'can use size' : null, ifNull: 'MISSING')); description.add(new DiagnosticsProperty<ParentData>('parentData', parentData, tooltip: _debugCanParentUseSize == true ? 'can use size' : null, missingIfNull: true));
description.add(new DiagnosticsProperty<Constraints>('constraints', constraints, ifNull: 'MISSING')); description.add(new DiagnosticsProperty<Constraints>('constraints', constraints, missingIfNull: true));
// don't access it via the "layer" getter since that's only valid when we don't need paint // don't access it via the "layer" getter since that's only valid when we don't need paint
description.add(new DiagnosticsProperty<OffsetLayer>('layer', _layer, defaultValue: null)); description.add(new DiagnosticsProperty<OffsetLayer>('layer', _layer, defaultValue: null));
description.add(new DiagnosticsProperty<SemanticsNode>('semantics node', _semantics, defaultValue: null)); description.add(new DiagnosticsProperty<SemanticsNode>('semantics node', _semantics, defaultValue: null));
......
...@@ -158,14 +158,14 @@ class SemanticsData extends Diagnosticable { ...@@ -158,14 +158,14 @@ class SemanticsData extends Diagnosticable {
if ((actions & action.index) != 0) if ((actions & action.index) != 0)
actionSummary.add(describeEnum(action)); actionSummary.add(describeEnum(action));
} }
properties.add(new IterableProperty<String>('actions', actionSummary, hidden: actionSummary.isEmpty)); properties.add(new IterableProperty<String>('actions', actionSummary, ifEmpty: null));
final List<String> flagSummary = <String>[]; final List<String> flagSummary = <String>[];
for (SemanticsFlags flag in SemanticsFlags.values.values) { for (SemanticsFlags flag in SemanticsFlags.values.values) {
if ((flags & flag.index) != 0) if ((flags & flag.index) != 0)
flagSummary.add(describeEnum(flag)); flagSummary.add(describeEnum(flag));
} }
properties.add(new IterableProperty<String>('flags', flagSummary, hidden: flagSummary.isEmpty)); properties.add(new IterableProperty<String>('flags', flagSummary, ifEmpty: null));
properties.add(new StringProperty('label', label, defaultValue: '')); properties.add(new StringProperty('label', label, defaultValue: ''));
properties.add(new EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null)); properties.add(new EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
} }
...@@ -758,7 +758,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin { ...@@ -758,7 +758,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
properties.add(new FlagProperty('inDirtyNodes', value: inDirtyNodes, ifTrue: 'dirty', ifFalse: 'STALE')); properties.add(new FlagProperty('inDirtyNodes', value: inDirtyNodes, ifTrue: 'dirty', ifFalse: 'STALE'));
hideOwner = inDirtyNodes; hideOwner = inDirtyNodes;
} }
properties.add(new DiagnosticsProperty<SemanticsOwner>('owner', owner, hidden: hideOwner)); properties.add(new DiagnosticsProperty<SemanticsOwner>('owner', owner, level: hideOwner ? DiagnosticLevel.hidden : DiagnosticLevel.info));
properties.add(new FlagProperty('shouldMergeAllDescendantsIntoThisNode', value: _shouldMergeAllDescendantsIntoThisNode, ifTrue: 'leaf merge')); properties.add(new FlagProperty('shouldMergeAllDescendantsIntoThisNode', value: _shouldMergeAllDescendantsIntoThisNode, ifTrue: 'leaf merge'));
final Offset offset = transform != null ? MatrixUtils.getAsTranslation(transform) : null; final Offset offset = transform != null ? MatrixUtils.getAsTranslation(transform) : null;
if (offset != null) { if (offset != null) {
...@@ -780,8 +780,8 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin { ...@@ -780,8 +780,8 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
if ((_actions & action.index) != 0) if ((_actions & action.index) != 0)
actions.add(describeEnum(action)); actions.add(describeEnum(action));
} }
properties.add(new IterableProperty<String>('actions', actions, hidden: actions.isEmpty)); properties.add(new IterableProperty<String>('actions', actions, ifEmpty: null));
properties.add(new IterableProperty<SemanticsTag>('tags', _tags, hidden: _tags.isEmpty)); properties.add(new IterableProperty<SemanticsTag>('tags', _tags, ifEmpty: null));
if (hasCheckedState) if (hasCheckedState)
properties.add(new FlagProperty('isChecked', value: isChecked, ifTrue: 'checked', ifFalse: 'unchecked')); properties.add(new FlagProperty('isChecked', value: isChecked, ifTrue: 'checked', ifFalse: 'unchecked'));
properties.add(new FlagProperty('isSelected', value: isSelected, ifTrue: 'selected')); properties.add(new FlagProperty('isSelected', value: isSelected, ifTrue: 'selected'));
...@@ -797,10 +797,11 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin { ...@@ -797,10 +797,11 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
String toStringDeep({ String toStringDeep({
String prefixLineOne: '', String prefixLineOne: '',
String prefixOtherLines, String prefixOtherLines,
DiagnosticLevel minLevel: DiagnosticLevel.debug,
DebugSemanticsDumpOrder childOrder: DebugSemanticsDumpOrder.traversal, DebugSemanticsDumpOrder childOrder: DebugSemanticsDumpOrder.traversal,
}) { }) {
assert(childOrder != null); assert(childOrder != null);
return toDiagnosticsNode(childOrder: childOrder).toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines); return toDiagnosticsNode(childOrder: childOrder).toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines, minLevel: minLevel);
} }
@override @override
......
...@@ -1026,7 +1026,7 @@ abstract class RenderSliver extends RenderObject { ...@@ -1026,7 +1026,7 @@ abstract class RenderSliver extends RenderObject {
assert(geometry.debugAssertIsValid( assert(geometry.debugAssertIsValid(
informationCollector: (StringBuffer information) { informationCollector: (StringBuffer information) {
information.writeln('The RenderSliver that returned the offending geometry was:'); information.writeln('The RenderSliver that returned the offending geometry was:');
information.writeln(' ${toStringShallow('\n ')}'); information.writeln(' ${toStringShallow(joiner: '\n ')}');
}, },
)); ));
assert(() { assert(() {
...@@ -1034,7 +1034,7 @@ abstract class RenderSliver extends RenderObject { ...@@ -1034,7 +1034,7 @@ abstract class RenderSliver extends RenderObject {
throw new FlutterError( throw new FlutterError(
'SliverGeometry has a paintOffset that exceeds the remainingPaintExtent from the constraints.\n' 'SliverGeometry has a paintOffset that exceeds the remainingPaintExtent from the constraints.\n'
'The render object whose geometry violates the constraints is the following:\n' 'The render object whose geometry violates the constraints is the following:\n'
' ${toStringShallow('\n ')}\n' + ' ${toStringShallow(joiner: '\n ')}\n' +
_debugCompareFloats('remainingPaintExtent', constraints.remainingPaintExtent, _debugCompareFloats('remainingPaintExtent', constraints.remainingPaintExtent,
'paintExtent', geometry.paintExtent) + 'paintExtent', geometry.paintExtent) +
'The paintExtent must cause the child sliver to paint within the viewport, and so ' 'The paintExtent must cause the child sliver to paint within the viewport, and so '
......
...@@ -1281,7 +1281,7 @@ class RenderTable extends RenderBox { ...@@ -1281,7 +1281,7 @@ class RenderTable extends RenderBox {
void debugFillProperties(DiagnosticPropertiesBuilder description) { void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description); super.debugFillProperties(description);
description.add(new DiagnosticsProperty<TableBorder>('border', border, defaultValue: null)); description.add(new DiagnosticsProperty<TableBorder>('border', border, defaultValue: null));
description.add(new DiagnosticsProperty<Map<int, TableColumnWidth>>('specified column widths', _columnWidths, hidden: _columnWidths.isEmpty)); description.add(new DiagnosticsProperty<Map<int, TableColumnWidth>>('specified column widths', _columnWidths, level: _columnWidths.isEmpty ? DiagnosticLevel.hidden : DiagnosticLevel.info));
description.add(new DiagnosticsProperty<TableColumnWidth>('default column width', defaultColumnWidth)); description.add(new DiagnosticsProperty<TableColumnWidth>('default column width', defaultColumnWidth));
description.add(new MessageProperty('table size', '$columns\u00D7$rows')); description.add(new MessageProperty('table size', '$columns\u00D7$rows'));
description.add(new IterableProperty<double>('column offsets', _columnLefts, ifNull: 'unknown')); description.add(new IterableProperty<double>('column offsets', _columnLefts, ifNull: 'unknown'));
......
...@@ -158,7 +158,7 @@ class ImageStream extends Diagnosticable { ...@@ -158,7 +158,7 @@ class ImageStream extends Diagnosticable {
_listeners, _listeners,
ifPresent: '${_listeners?.length} listener${_listeners?.length == 1 ? "" : "s" }', ifPresent: '${_listeners?.length} listener${_listeners?.length == 1 ? "" : "s" }',
ifNull: 'no listeners', ifNull: 'no listeners',
hidden: _completer != null, level: _completer != null ? DiagnosticLevel.hidden : DiagnosticLevel.info,
)); ));
_completer?.debugFillProperties(properties); _completer?.debugFillProperties(properties);
} }
......
...@@ -1464,9 +1464,9 @@ class SizedBox extends SingleChildRenderObjectWidget { ...@@ -1464,9 +1464,9 @@ class SizedBox extends SingleChildRenderObjectWidget {
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder description) { void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description); super.debugFillProperties(description);
final bool hidden = width == double.INFINITY && height == double.INFINITY; final DiagnosticLevel level = (width == double.INFINITY && height == double.INFINITY) ? DiagnosticLevel.hidden : DiagnosticLevel.info;
description.add(new DoubleProperty('width', width, defaultValue: null, hidden: hidden)); description.add(new DoubleProperty('width', width, defaultValue: null, level: level));
description.add(new DoubleProperty('height', height, defaultValue: null, hidden: hidden)); description.add(new DoubleProperty('height', height, defaultValue: null, level: level));
} }
} }
......
...@@ -99,7 +99,7 @@ class DecoratedBox extends SingleChildRenderObjectWidget { ...@@ -99,7 +99,7 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
} else { } else {
label = 'decoration'; label = 'decoration';
} }
description.add(new EnumProperty<DecorationPosition>('position', position, hidden: position != null)); description.add(new EnumProperty<DecorationPosition>('position', position, level: position != null ? DiagnosticLevel.hidden : DiagnosticLevel.info));
description.add(new DiagnosticsProperty<Decoration>( description.add(new DiagnosticsProperty<Decoration>(
label, label,
decoration, decoration,
......
...@@ -15,6 +15,7 @@ export 'dart:ui' show hashValues, hashList; ...@@ -15,6 +15,7 @@ export 'dart:ui' show hashValues, hashList;
export 'package:flutter/foundation.dart' show FlutterError, debugPrint, debugPrintStack; export 'package:flutter/foundation.dart' show FlutterError, debugPrint, debugPrintStack;
export 'package:flutter/foundation.dart' show VoidCallback, ValueChanged, ValueGetter, ValueSetter; export 'package:flutter/foundation.dart' show VoidCallback, ValueChanged, ValueGetter, ValueSetter;
export 'package:flutter/foundation.dart' show DiagnosticLevel;
export 'package:flutter/rendering.dart' show RenderObject, RenderBox, debugDumpRenderTree, debugDumpLayerTree; export 'package:flutter/rendering.dart' show RenderObject, RenderBox, debugDumpRenderTree, debugDumpLayerTree;
// Examples can assume: // Examples can assume:
...@@ -3131,7 +3132,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3131,7 +3132,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
'The size getter was called for the following element:\n' 'The size getter was called for the following element:\n'
' $this\n' ' $this\n'
'The associated render sliver was:\n' 'The associated render sliver was:\n'
' ${renderObject.toStringShallow("\n ")}' ' ${renderObject.toStringShallow(joiner: "\n ")}'
); );
} }
if (renderObject is! RenderBox) { if (renderObject is! RenderBox) {
...@@ -3144,7 +3145,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3144,7 +3145,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
'The size getter was called for the following element:\n' 'The size getter was called for the following element:\n'
' $this\n' ' $this\n'
'The associated render object was:\n' 'The associated render object was:\n'
' ${renderObject.toStringShallow("\n ")}' ' ${renderObject.toStringShallow(joiner: "\n ")}'
); );
} }
final RenderBox box = renderObject; final RenderBox box = renderObject;
...@@ -3159,7 +3160,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3159,7 +3160,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
'The size getter was called for the following element:\n' 'The size getter was called for the following element:\n'
' $this\n' ' $this\n'
'The render object from which the size was to be obtained was:\n' 'The render object from which the size was to be obtained was:\n'
' ${box.toStringShallow("\n ")}' ' ${box.toStringShallow(joiner: "\n ")}'
); );
} }
if (box.debugNeedsLayout) { if (box.debugNeedsLayout) {
...@@ -3173,7 +3174,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3173,7 +3174,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
'The size getter was called for the following element:\n' 'The size getter was called for the following element:\n'
' $this\n' ' $this\n'
'The render object from which the size was to be obtained was:\n' 'The render object from which the size was to be obtained was:\n'
' ${box.toStringShallow("\n ")}\n' ' ${box.toStringShallow(joiner: "\n ")}\n'
'Consider using debugPrintMarkNeedsLayoutStacks to determine why the render ' 'Consider using debugPrintMarkNeedsLayoutStacks to determine why the render '
'object in question is dirty, if you did not expect this.' 'object in question is dirty, if you did not expect this.'
); );
...@@ -3333,7 +3334,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3333,7 +3334,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
description.add(new ObjectFlagProperty<int>('depth', depth, ifNull: 'no depth')); description.add(new ObjectFlagProperty<int>('depth', depth, ifNull: 'no depth'));
description.add(new ObjectFlagProperty<Widget>('widget', widget, ifNull: 'no widget')); description.add(new ObjectFlagProperty<Widget>('widget', widget, ifNull: 'no widget'));
if (widget != null) { if (widget != null) {
description.add(new DiagnosticsProperty<Key>('key', widget?.key, showName: false, defaultValue: null, hidden: true)); description.add(new DiagnosticsProperty<Key>('key', widget?.key, showName: false, defaultValue: null, level: DiagnosticLevel.hidden));
widget.debugFillProperties(description); widget.debugFillProperties(description);
} }
description.add(new FlagProperty('dirty', value: dirty, ifTrue: 'dirty')); description.add(new FlagProperty('dirty', value: dirty, ifTrue: 'dirty'));
......
...@@ -713,7 +713,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> { ...@@ -713,7 +713,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> {
if (gestures.isEmpty) if (gestures.isEmpty)
gestures.add('<none>'); gestures.add('<none>');
description.add(new IterableProperty<String>('gestures', gestures)); description.add(new IterableProperty<String>('gestures', gestures));
description.add(new IterableProperty<GestureRecognizer>('recognizers', _recognizers.values, hidden: true)); description.add(new IterableProperty<GestureRecognizer>('recognizers', _recognizers.values, level: DiagnosticLevel.fine));
} }
description.add(new EnumProperty<HitTestBehavior>('behavior', widget.behavior, defaultValue: null)); description.add(new EnumProperty<HitTestBehavior>('behavior', widget.behavior, defaultValue: null));
} }
......
...@@ -193,7 +193,7 @@ void main() { ...@@ -193,7 +193,7 @@ void main() {
new StringProperty('stringProperty1', 'value1', quoted: false), new StringProperty('stringProperty1', 'value1', quoted: false),
new DoubleProperty('doubleProperty1', 42.5), new DoubleProperty('doubleProperty1', 42.5),
new DoubleProperty('roundedProperty', 1.0 / 3.0), new DoubleProperty('roundedProperty', 1.0 / 3.0),
new StringProperty('DO_NOT_SHOW', 'DO_NOT_SHOW', hidden: true, quoted: false), new StringProperty('DO_NOT_SHOW', 'DO_NOT_SHOW', level: DiagnosticLevel.hidden, quoted: false),
new DiagnosticsProperty<Object>('DO_NOT_SHOW_NULL', null, defaultValue: null), new DiagnosticsProperty<Object>('DO_NOT_SHOW_NULL', null, defaultValue: null),
new DiagnosticsProperty<Object>('nullProperty', null), new DiagnosticsProperty<Object>('nullProperty', null),
new StringProperty('node_type', '<root node>', showName: false, quoted: false), new StringProperty('node_type', '<root node>', showName: false, quoted: false),
...@@ -590,9 +590,9 @@ void main() { ...@@ -590,9 +590,9 @@ void main() {
equals('<hidden>'), equals('<hidden>'),
); );
expect(new StringProperty('name', null).hidden, isFalse); expect(new StringProperty('name', null).isFiltered(DiagnosticLevel.info), isFalse);
expect(new StringProperty('name', 'value', hidden: true).hidden, isTrue); expect(new StringProperty('name', 'value', level: DiagnosticLevel.hidden).isFiltered(DiagnosticLevel.info), isTrue);
expect(new StringProperty('name', null, defaultValue: null).hidden, isTrue); expect(new StringProperty('name', null, defaultValue: null).isFiltered(DiagnosticLevel.info), isTrue);
expect( expect(
new StringProperty( new StringProperty(
'name', 'name',
...@@ -622,11 +622,11 @@ void main() { ...@@ -622,11 +622,11 @@ void main() {
final DiagnosticsProperty<bool> trueProperty = new DiagnosticsProperty<bool>('name', true); final DiagnosticsProperty<bool> trueProperty = new DiagnosticsProperty<bool>('name', true);
final DiagnosticsProperty<bool> falseProperty = new DiagnosticsProperty<bool>('name', false); final DiagnosticsProperty<bool> falseProperty = new DiagnosticsProperty<bool>('name', false);
expect(trueProperty.toString(), equals('name: true')); expect(trueProperty.toString(), equals('name: true'));
expect(trueProperty.hidden, isFalse); expect(trueProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(trueProperty.value, isTrue); expect(trueProperty.value, isTrue);
expect(falseProperty.toString(), equals('name: false')); expect(falseProperty.toString(), equals('name: false'));
expect(falseProperty.value, isFalse); expect(falseProperty.value, isFalse);
expect(falseProperty.hidden, isFalse); expect(falseProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect( expect(
new DiagnosticsProperty<bool>( new DiagnosticsProperty<bool>(
'name', 'name',
...@@ -640,9 +640,9 @@ void main() { ...@@ -640,9 +640,9 @@ void main() {
equals('true'), equals('true'),
); );
expect(new DiagnosticsProperty<bool>('name', null).hidden, isFalse); expect(new DiagnosticsProperty<bool>('name', null).isFiltered(DiagnosticLevel.info), isFalse);
expect(new DiagnosticsProperty<bool>('name', true, hidden: true).hidden, isTrue); expect(new DiagnosticsProperty<bool>('name', true, level: DiagnosticLevel.hidden).isFiltered(DiagnosticLevel.info), isTrue);
expect(new DiagnosticsProperty<bool>('name', null, defaultValue: null).hidden, isTrue); expect(new DiagnosticsProperty<bool>('name', null, defaultValue: null).isFiltered(DiagnosticLevel.info), isTrue);
expect( expect(
new DiagnosticsProperty<bool>('name', null, ifNull: 'missing').toString(), new DiagnosticsProperty<bool>('name', null, ifNull: 'missing').toString(),
equals('name: missing'), equals('name: missing'),
...@@ -665,8 +665,8 @@ void main() { ...@@ -665,8 +665,8 @@ void main() {
expect(trueFlag.value, isTrue); expect(trueFlag.value, isTrue);
expect(falseFlag.value, isFalse); expect(falseFlag.value, isFalse);
expect(trueFlag.hidden, isFalse); expect(trueFlag.isFiltered(DiagnosticLevel.fine), isFalse);
expect(falseFlag.hidden, isTrue); expect(falseFlag.isFiltered(DiagnosticLevel.fine), isTrue);
}); });
test('property with tooltip test', () { test('property with tooltip test', () {
...@@ -680,7 +680,7 @@ void main() { ...@@ -680,7 +680,7 @@ void main() {
equals('name: value (tooltip)'), equals('name: value (tooltip)'),
); );
expect(withTooltip.value, equals('value')); expect(withTooltip.value, equals('value'));
expect(withTooltip.hidden, isFalse); expect(withTooltip.isFiltered(DiagnosticLevel.fine), isFalse);
}); });
test('double property test', () { test('double property test', () {
...@@ -689,13 +689,13 @@ void main() { ...@@ -689,13 +689,13 @@ void main() {
42.0, 42.0,
); );
expect(doubleProperty.toString(), equals('name: 42.0')); expect(doubleProperty.toString(), equals('name: 42.0'));
expect(doubleProperty.hidden, isFalse); expect(doubleProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(doubleProperty.value, equals(42.0)); expect(doubleProperty.value, equals(42.0));
expect(new DoubleProperty('name', 1.3333).toString(), equals('name: 1.3')); expect(new DoubleProperty('name', 1.3333).toString(), equals('name: 1.3'));
expect(new DoubleProperty('name', null).toString(), equals('name: null')); expect(new DoubleProperty('name', null).toString(), equals('name: null'));
expect(new DoubleProperty('name', null).hidden, equals(false)); expect(new DoubleProperty('name', null).isFiltered(DiagnosticLevel.info), equals(false));
expect( expect(
new DoubleProperty('name', null, ifNull: 'missing').toString(), new DoubleProperty('name', null, ifNull: 'missing').toString(),
...@@ -716,7 +716,7 @@ void main() { ...@@ -716,7 +716,7 @@ void main() {
() => 42.0, () => 42.0,
); );
expect(safe.toString(), equals('name: 42.0')); expect(safe.toString(), equals('name: 42.0'));
expect(safe.hidden, isFalse); expect(safe.isFiltered(DiagnosticLevel.info), isFalse);
expect(safe.value, equals(42.0)); expect(safe.value, equals(42.0));
expect( expect(
...@@ -729,7 +729,7 @@ void main() { ...@@ -729,7 +729,7 @@ void main() {
equals('name: null'), equals('name: null'),
); );
expect( expect(
new DoubleProperty.lazy('name', () => null).hidden, new DoubleProperty.lazy('name', () => null).isFiltered(DiagnosticLevel.info),
equals(false), equals(false),
); );
...@@ -740,11 +740,12 @@ void main() { ...@@ -740,11 +740,12 @@ void main() {
// TODO(jacobr): it would be better if throwingProperty.object threw an // TODO(jacobr): it would be better if throwingProperty.object threw an
// exception. // exception.
expect(throwingProperty.value, isNull); expect(throwingProperty.value, isNull);
expect(throwingProperty.hidden, isFalse); expect(throwingProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect( expect(
throwingProperty.toString(), throwingProperty.toString(),
equals('name: EXCEPTION (FlutterError)'), equals('name: EXCEPTION (FlutterError)'),
); );
expect(throwingProperty.level, equals(DiagnosticLevel.error));
}); });
test('percent property', () { test('percent property', () {
...@@ -828,10 +829,10 @@ void main() { ...@@ -828,10 +829,10 @@ void main() {
); );
expect(present.toString(), equals('clickable')); expect(present.toString(), equals('clickable'));
expect(present.hidden, isFalse); expect(present.isFiltered(DiagnosticLevel.info), isFalse);
expect(present.value, equals(onClick)); expect(present.value, equals(onClick));
expect(missing.toString(), equals('')); expect(missing.toString(), equals('onClick: null'));
expect(missing.hidden, isTrue); expect(missing.isFiltered(DiagnosticLevel.fine), isTrue);
}); });
test('missing callback property test', () { test('missing callback property test', () {
...@@ -847,11 +848,11 @@ void main() { ...@@ -847,11 +848,11 @@ void main() {
ifNull: 'disabled', ifNull: 'disabled',
); );
expect(present.toString(), equals('')); expect(present.toString(), equals('onClick: Closure: () => dynamic'));
expect(present.hidden, isTrue); expect(present.isFiltered(DiagnosticLevel.fine), isTrue);
expect(present.value, equals(onClick)); expect(present.value, equals(onClick));
expect(missing.toString(), equals('disabled')); expect(missing.toString(), equals('disabled'));
expect(missing.hidden, isFalse); expect(missing.isFiltered(DiagnosticLevel.info), isFalse);
}); });
test('describe bool property', () { test('describe bool property', () {
...@@ -870,10 +871,10 @@ void main() { ...@@ -870,10 +871,10 @@ void main() {
showName: true, showName: true,
); );
expect(yes.toString(), equals('name: YES')); expect(yes.toString(), equals('name: YES'));
expect(yes.hidden, isFalse); expect(yes.level, equals(DiagnosticLevel.info));
expect(yes.value, isTrue); expect(yes.value, isTrue);
expect(no.toString(), equals('name: NO')); expect(no.toString(), equals('name: NO'));
expect(no.hidden, isFalse); expect(no.level, equals(DiagnosticLevel.info));
expect(no.value, isFalse); expect(no.value, isFalse);
expect( expect(
...@@ -902,10 +903,10 @@ void main() { ...@@ -902,10 +903,10 @@ void main() {
value: true, value: true,
ifTrue: 'YES', ifTrue: 'YES',
ifFalse: 'NO', ifFalse: 'NO',
hidden: true, level: DiagnosticLevel.hidden,
showName: true, showName: true,
).hidden, ).level,
isTrue, equals(DiagnosticLevel.hidden),
); );
}); });
...@@ -926,19 +927,19 @@ void main() { ...@@ -926,19 +927,19 @@ void main() {
'name', 'name',
null, null,
); );
expect(hello.hidden, isFalse); expect(hello.level, equals(DiagnosticLevel.info));
expect(hello.value, equals(ExampleEnum.hello)); expect(hello.value, equals(ExampleEnum.hello));
expect(hello.toString(), equals('name: hello')); expect(hello.toString(), equals('name: hello'));
expect(world.hidden, isFalse); expect(world.level, equals(DiagnosticLevel.info));
expect(world.value, equals(ExampleEnum.world)); expect(world.value, equals(ExampleEnum.world));
expect(world.toString(), equals('name: world')); expect(world.toString(), equals('name: world'));
expect(deferToChild.hidden, isFalse); expect(deferToChild.level, equals(DiagnosticLevel.info));
expect(deferToChild.value, equals(ExampleEnum.deferToChild)); expect(deferToChild.value, equals(ExampleEnum.deferToChild));
expect(deferToChild.toString(), equals('name: defer-to-child')); expect(deferToChild.toString(), equals('name: defer-to-child'));
expect(nullEnum.hidden, isFalse); expect(nullEnum.level, equals(DiagnosticLevel.info));
expect(nullEnum.value, isNull); expect(nullEnum.value, isNull);
expect(nullEnum.toString(), equals('name: null')); expect(nullEnum.toString(), equals('name: null'));
...@@ -949,16 +950,16 @@ void main() { ...@@ -949,16 +950,16 @@ void main() {
); );
expect(matchesDefault.toString(), equals('name: hello')); expect(matchesDefault.toString(), equals('name: hello'));
expect(matchesDefault.value, equals(ExampleEnum.hello)); expect(matchesDefault.value, equals(ExampleEnum.hello));
expect(matchesDefault.hidden, isTrue); expect(matchesDefault.isFiltered(DiagnosticLevel.info), isTrue);
expect( expect(
new EnumProperty<ExampleEnum>( new EnumProperty<ExampleEnum>(
'name', 'name',
ExampleEnum.hello, ExampleEnum.hello,
hidden: true, level: DiagnosticLevel.hidden,
).hidden, ).level,
isTrue, equals(DiagnosticLevel.hidden),
); );
}); });
...@@ -969,7 +970,7 @@ void main() { ...@@ -969,7 +970,7 @@ void main() {
); );
expect(regular.toString(), equals('name: 42')); expect(regular.toString(), equals('name: 42'));
expect(regular.value, equals(42)); expect(regular.value, equals(42));
expect(regular.hidden, isFalse); expect(regular.level, equals(DiagnosticLevel.info));
final IntProperty nullValue = new IntProperty( final IntProperty nullValue = new IntProperty(
'name', 'name',
...@@ -977,16 +978,16 @@ void main() { ...@@ -977,16 +978,16 @@ void main() {
); );
expect(nullValue.toString(), equals('name: null')); expect(nullValue.toString(), equals('name: null'));
expect(nullValue.value, isNull); expect(nullValue.value, isNull);
expect(nullValue.hidden, isFalse); expect(nullValue.level, equals(DiagnosticLevel.info));
final IntProperty hideNull = new IntProperty( final IntProperty hideNull = new IntProperty(
'name', 'name',
null, null,
defaultValue: null defaultValue: null,
); );
expect(hideNull.toString(), equals('name: null')); expect(hideNull.toString(), equals('name: null'));
expect(hideNull.value, isNull); expect(hideNull.value, isNull);
expect(hideNull.hidden, isTrue); expect(hideNull.isFiltered(DiagnosticLevel.info), isTrue);
final IntProperty nullDescription = new IntProperty( final IntProperty nullDescription = new IntProperty(
'name', 'name',
...@@ -995,7 +996,7 @@ void main() { ...@@ -995,7 +996,7 @@ void main() {
); );
expect(nullDescription.toString(), equals('name: missing')); expect(nullDescription.toString(), equals('name: missing'));
expect(nullDescription.value, isNull); expect(nullDescription.value, isNull);
expect(nullDescription.hidden, isFalse); expect(nullDescription.level, equals(DiagnosticLevel.info));
final IntProperty hideName = new IntProperty( final IntProperty hideName = new IntProperty(
'name', 'name',
...@@ -1004,7 +1005,7 @@ void main() { ...@@ -1004,7 +1005,7 @@ void main() {
); );
expect(hideName.toString(), equals('42')); expect(hideName.toString(), equals('42'));
expect(hideName.value, equals(42)); expect(hideName.value, equals(42));
expect(hideName.hidden, isFalse); expect(hideName.level, equals(DiagnosticLevel.info));
final IntProperty withUnit = new IntProperty( final IntProperty withUnit = new IntProperty(
'name', 'name',
...@@ -1013,7 +1014,7 @@ void main() { ...@@ -1013,7 +1014,7 @@ void main() {
); );
expect(withUnit.toString(), equals('name: 42pt')); expect(withUnit.toString(), equals('name: 42pt'));
expect(withUnit.value, equals(42)); expect(withUnit.value, equals(42));
expect(withUnit.hidden, isFalse); expect(withUnit.level, equals(DiagnosticLevel.info));
final IntProperty defaultValue = new IntProperty( final IntProperty defaultValue = new IntProperty(
'name', 'name',
...@@ -1022,7 +1023,7 @@ void main() { ...@@ -1022,7 +1023,7 @@ void main() {
); );
expect(defaultValue.toString(), equals('name: 42')); expect(defaultValue.toString(), equals('name: 42'));
expect(defaultValue.value, equals(42)); expect(defaultValue.value, equals(42));
expect(defaultValue.hidden, isTrue); expect(defaultValue.isFiltered(DiagnosticLevel.info), isTrue);
final IntProperty notDefaultValue = new IntProperty( final IntProperty notDefaultValue = new IntProperty(
'name', 'name',
...@@ -1031,16 +1032,16 @@ void main() { ...@@ -1031,16 +1032,16 @@ void main() {
); );
expect(notDefaultValue.toString(), equals('name: 43')); expect(notDefaultValue.toString(), equals('name: 43'));
expect(notDefaultValue.value, equals(43)); expect(notDefaultValue.value, equals(43));
expect(notDefaultValue.hidden, isFalse); expect(notDefaultValue.level, equals(DiagnosticLevel.info));
final IntProperty hidden = new IntProperty( final IntProperty hidden = new IntProperty(
'name', 'name',
42, 42,
hidden: true, level: DiagnosticLevel.hidden,
); );
expect(hidden.toString(), equals('name: 42')); expect(hidden.toString(), equals('name: 42'));
expect(hidden.value, equals(42)); expect(hidden.value, equals(42));
expect(hidden.hidden, isTrue); expect(hidden.level, equals(DiagnosticLevel.hidden));
}); });
test('object property test', () { test('object property test', () {
...@@ -1050,7 +1051,7 @@ void main() { ...@@ -1050,7 +1051,7 @@ void main() {
rect, rect,
); );
expect(simple.value, equals(rect)); expect(simple.value, equals(rect));
expect(simple.hidden, isFalse); expect(simple.level, equals(DiagnosticLevel.info));
expect(simple.toString(), equals('name: Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)')); expect(simple.toString(), equals('name: Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)'));
final DiagnosticsNode withDescription = new DiagnosticsProperty<Rect>( final DiagnosticsNode withDescription = new DiagnosticsProperty<Rect>(
...@@ -1059,7 +1060,7 @@ void main() { ...@@ -1059,7 +1060,7 @@ void main() {
description: 'small rect', description: 'small rect',
); );
expect(withDescription.value, equals(rect)); expect(withDescription.value, equals(rect));
expect(withDescription.hidden, isFalse); expect(withDescription.level, equals(DiagnosticLevel.info));
expect(withDescription.toString(), equals('name: small rect')); expect(withDescription.toString(), equals('name: small rect'));
final DiagnosticsProperty<Object> nullProperty = new DiagnosticsProperty<Object>( final DiagnosticsProperty<Object> nullProperty = new DiagnosticsProperty<Object>(
...@@ -1067,7 +1068,7 @@ void main() { ...@@ -1067,7 +1068,7 @@ void main() {
null, null,
); );
expect(nullProperty.value, isNull); expect(nullProperty.value, isNull);
expect(nullProperty.hidden, isFalse); expect(nullProperty.level, equals(DiagnosticLevel.info));
expect(nullProperty.toString(), equals('name: null')); expect(nullProperty.toString(), equals('name: null'));
final DiagnosticsProperty<Object> hideNullProperty = new DiagnosticsProperty<Object>( final DiagnosticsProperty<Object> hideNullProperty = new DiagnosticsProperty<Object>(
...@@ -1076,7 +1077,7 @@ void main() { ...@@ -1076,7 +1077,7 @@ void main() {
defaultValue: null, defaultValue: null,
); );
expect(hideNullProperty.value, isNull); expect(hideNullProperty.value, isNull);
expect(hideNullProperty.hidden, isTrue); expect(hideNullProperty.isFiltered(DiagnosticLevel.info), isTrue);
expect(hideNullProperty.toString(), equals('name: null')); expect(hideNullProperty.toString(), equals('name: null'));
final DiagnosticsNode nullDescription = new DiagnosticsProperty<Object>( final DiagnosticsNode nullDescription = new DiagnosticsProperty<Object>(
...@@ -1085,16 +1086,17 @@ void main() { ...@@ -1085,16 +1086,17 @@ void main() {
ifNull: 'missing', ifNull: 'missing',
); );
expect(nullDescription.value, isNull); expect(nullDescription.value, isNull);
expect(nullDescription.hidden, isFalse); expect(nullDescription.level, equals(DiagnosticLevel.info));
expect(nullDescription.toString(), equals('name: missing')); expect(nullDescription.toString(), equals('name: missing'));
final DiagnosticsProperty<Rect> hideName = new DiagnosticsProperty<Rect>( final DiagnosticsProperty<Rect> hideName = new DiagnosticsProperty<Rect>(
'name', 'name',
rect, rect,
showName: false, showName: false,
level: DiagnosticLevel.warning
); );
expect(hideName.value, equals(rect)); expect(hideName.value, equals(rect));
expect(hideName.hidden, isFalse); expect(hideName.level, equals(DiagnosticLevel.warning));
expect(hideName.toString(), equals('Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)')); expect(hideName.toString(), equals('Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)'));
final DiagnosticsProperty<Rect> hideSeparator = new DiagnosticsProperty<Rect>( final DiagnosticsProperty<Rect> hideSeparator = new DiagnosticsProperty<Rect>(
...@@ -1103,7 +1105,7 @@ void main() { ...@@ -1103,7 +1105,7 @@ void main() {
showSeparator: false, showSeparator: false,
); );
expect(hideSeparator.value, equals(rect)); expect(hideSeparator.value, equals(rect));
expect(hideSeparator.hidden, isFalse); expect(hideSeparator.level, equals(DiagnosticLevel.info));
expect( expect(
hideSeparator.toString(), hideSeparator.toString(),
equals('Creator Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)'), equals('Creator Rect.fromLTRB(0.0, 0.0, 20.0, 20.0)'),
...@@ -1118,7 +1120,7 @@ void main() { ...@@ -1118,7 +1120,7 @@ void main() {
description: 'small rect', description: 'small rect',
); );
expect(simple.value, equals(rect)); expect(simple.value, equals(rect));
expect(simple.hidden, isFalse); expect(simple.level, equals(DiagnosticLevel.info));
expect(simple.toString(), equals('name: small rect')); expect(simple.toString(), equals('name: small rect'));
final DiagnosticsNode nullProperty = new DiagnosticsProperty<Object>.lazy( final DiagnosticsNode nullProperty = new DiagnosticsProperty<Object>.lazy(
...@@ -1127,7 +1129,7 @@ void main() { ...@@ -1127,7 +1129,7 @@ void main() {
description: 'missing', description: 'missing',
); );
expect(nullProperty.value, isNull); expect(nullProperty.value, isNull);
expect(nullProperty.hidden, isFalse); expect(nullProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(nullProperty.toString(), equals('name: missing')); expect(nullProperty.toString(), equals('name: missing'));
final DiagnosticsNode hideNullProperty = new DiagnosticsProperty<Object>.lazy( final DiagnosticsNode hideNullProperty = new DiagnosticsProperty<Object>.lazy(
...@@ -1137,7 +1139,7 @@ void main() { ...@@ -1137,7 +1139,7 @@ void main() {
defaultValue: null, defaultValue: null,
); );
expect(hideNullProperty.value, isNull); expect(hideNullProperty.value, isNull);
expect(hideNullProperty.hidden, isTrue); expect(hideNullProperty.isFiltered(DiagnosticLevel.info), isTrue);
expect(hideNullProperty.toString(), equals('name: missing')); expect(hideNullProperty.toString(), equals('name: missing'));
final DiagnosticsNode hideName = new DiagnosticsProperty<Rect>.lazy( final DiagnosticsNode hideName = new DiagnosticsProperty<Rect>.lazy(
...@@ -1147,7 +1149,7 @@ void main() { ...@@ -1147,7 +1149,7 @@ void main() {
showName: false, showName: false,
); );
expect(hideName.value, equals(rect)); expect(hideName.value, equals(rect));
expect(hideName.hidden, isFalse); expect(hideName.isFiltered(DiagnosticLevel.info), isFalse);
expect(hideName.toString(), equals('small rect')); expect(hideName.toString(), equals('small rect'));
final DiagnosticsProperty<Object> throwingWithDescription = new DiagnosticsProperty<Object>.lazy( final DiagnosticsProperty<Object> throwingWithDescription = new DiagnosticsProperty<Object>.lazy(
...@@ -1158,7 +1160,7 @@ void main() { ...@@ -1158,7 +1160,7 @@ void main() {
); );
expect(throwingWithDescription.value, isNull); expect(throwingWithDescription.value, isNull);
expect(throwingWithDescription.exception, isFlutterError); expect(throwingWithDescription.exception, isFlutterError);
expect(throwingWithDescription.hidden, false); expect(throwingWithDescription.isFiltered(DiagnosticLevel.info), false);
expect(throwingWithDescription.toString(), equals('name: missing')); expect(throwingWithDescription.toString(), equals('name: missing'));
final DiagnosticsProperty<Object> throwingProperty = new DiagnosticsProperty<Object>.lazy( final DiagnosticsProperty<Object> throwingProperty = new DiagnosticsProperty<Object>.lazy(
...@@ -1168,7 +1170,7 @@ void main() { ...@@ -1168,7 +1170,7 @@ void main() {
); );
expect(throwingProperty.value, isNull); expect(throwingProperty.value, isNull);
expect(throwingProperty.exception, isFlutterError); expect(throwingProperty.exception, isFlutterError);
expect(throwingProperty.hidden, false); expect(throwingProperty.isFiltered(DiagnosticLevel.info), false);
expect(throwingProperty.toString(), equals('name: EXCEPTION (FlutterError)')); expect(throwingProperty.toString(), equals('name: EXCEPTION (FlutterError)'));
}); });
...@@ -1181,7 +1183,7 @@ void main() { ...@@ -1181,7 +1183,7 @@ void main() {
'name', 'name',
color, color,
); );
expect(simple.hidden, isFalse); expect(simple.isFiltered(DiagnosticLevel.info), isFalse);
expect(simple.value, equals(color)); expect(simple.value, equals(color));
expect(simple.toString(), equals('name: Color(0xffffffff)')); expect(simple.toString(), equals('name: Color(0xffffffff)'));
}); });
...@@ -1194,7 +1196,7 @@ void main() { ...@@ -1194,7 +1196,7 @@ void main() {
); );
expect(show.name, equals('wasLayout')); expect(show.name, equals('wasLayout'));
expect(show.value, isTrue); expect(show.value, isTrue);
expect(show.hidden, isFalse); expect(show.isFiltered(DiagnosticLevel.info), isFalse);
expect(show.toString(), equals('layout computed')); expect(show.toString(), equals('layout computed'));
final FlagProperty hide = new FlagProperty( final FlagProperty hide = new FlagProperty(
...@@ -1204,8 +1206,18 @@ void main() { ...@@ -1204,8 +1206,18 @@ void main() {
); );
expect(hide.name, equals('wasLayout')); expect(hide.name, equals('wasLayout'));
expect(hide.value, isFalse); expect(hide.value, isFalse);
expect(hide.hidden, isTrue); expect(hide.level, equals(DiagnosticLevel.hidden));
expect(hide.toString(), equals('')); expect(hide.toString(), equals('wasLayout: false'));
final FlagProperty hideTrue = new FlagProperty(
'wasLayout',
value: true,
ifFalse: 'no layout computed',
);
expect(hideTrue.name, equals('wasLayout'));
expect(hideTrue.value, isTrue);
expect(hideTrue.level, equals(DiagnosticLevel.hidden));
expect(hideTrue.toString(), equals('wasLayout: true'));
}); });
test('has property test', () { test('has property test', () {
...@@ -1216,7 +1228,7 @@ void main() { ...@@ -1216,7 +1228,7 @@ void main() {
); );
expect(has.name, equals('onClick')); expect(has.name, equals('onClick'));
expect(has.value, equals(onClick)); expect(has.value, equals(onClick));
expect(has.hidden, isFalse); expect(has.isFiltered(DiagnosticLevel.info), isFalse);
expect(has.toString(), equals('has onClick')); expect(has.toString(), equals('has onClick'));
final ObjectFlagProperty<Function> missing = new ObjectFlagProperty<Function>.has( final ObjectFlagProperty<Function> missing = new ObjectFlagProperty<Function>.has(
...@@ -1225,8 +1237,8 @@ void main() { ...@@ -1225,8 +1237,8 @@ void main() {
); );
expect(missing.name, equals('onClick')); expect(missing.name, equals('onClick'));
expect(missing.value, isNull); expect(missing.value, isNull);
expect(missing.hidden, isTrue); expect(missing.isFiltered(DiagnosticLevel.info), isTrue);
expect(missing.toString(), equals('')); expect(missing.toString(), equals('onClick: null'));
}); });
test('iterable property test', () { test('iterable property test', () {
...@@ -1236,7 +1248,7 @@ void main() { ...@@ -1236,7 +1248,7 @@ void main() {
ints, ints,
); );
expect(intsProperty.value, equals(ints)); expect(intsProperty.value, equals(ints));
expect(intsProperty.hidden, isFalse); expect(intsProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(intsProperty.toString(), equals('ints: 1, 2, 3')); expect(intsProperty.toString(), equals('ints: 1, 2, 3'));
final IterableProperty<Object> emptyProperty = new IterableProperty<Object>( final IterableProperty<Object> emptyProperty = new IterableProperty<Object>(
...@@ -1244,7 +1256,7 @@ void main() { ...@@ -1244,7 +1256,7 @@ void main() {
<Object>[], <Object>[],
); );
expect(emptyProperty.value, isEmpty); expect(emptyProperty.value, isEmpty);
expect(emptyProperty.hidden, isFalse); expect(emptyProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(emptyProperty.toString(), equals('name: []')); expect(emptyProperty.toString(), equals('name: []'));
final IterableProperty<Object> nullProperty = new IterableProperty<Object>( final IterableProperty<Object> nullProperty = new IterableProperty<Object>(
...@@ -1252,7 +1264,7 @@ void main() { ...@@ -1252,7 +1264,7 @@ void main() {
null, null,
); );
expect(nullProperty.value, isNull); expect(nullProperty.value, isNull);
expect(nullProperty.hidden, isFalse); expect(nullProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect(nullProperty.toString(), equals('list: null')); expect(nullProperty.toString(), equals('list: null'));
final IterableProperty<Object> hideNullProperty = new IterableProperty<Object>( final IterableProperty<Object> hideNullProperty = new IterableProperty<Object>(
...@@ -1261,7 +1273,8 @@ void main() { ...@@ -1261,7 +1273,8 @@ void main() {
defaultValue: null, defaultValue: null,
); );
expect(hideNullProperty.value, isNull); expect(hideNullProperty.value, isNull);
expect(hideNullProperty.hidden, isTrue); expect(hideNullProperty.isFiltered(DiagnosticLevel.info), isTrue);
expect(hideNullProperty.level, equals(DiagnosticLevel.fine));
expect(hideNullProperty.toString(), equals('list: null')); expect(hideNullProperty.toString(), equals('list: null'));
final List<Object> objects = <Object>[ final List<Object> objects = <Object>[
...@@ -1273,7 +1286,7 @@ void main() { ...@@ -1273,7 +1286,7 @@ void main() {
objects, objects,
); );
expect(objectsProperty.value, equals(objects)); expect(objectsProperty.value, equals(objects));
expect(objectsProperty.hidden, isFalse); expect(objectsProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect( expect(
objectsProperty.toString(), objectsProperty.toString(),
equals('objects: Rect.fromLTRB(0.0, 0.0, 20.0, 20.0), Color(0xffffffff)'), equals('objects: Rect.fromLTRB(0.0, 0.0, 20.0, 20.0), Color(0xffffffff)'),
...@@ -1285,7 +1298,7 @@ void main() { ...@@ -1285,7 +1298,7 @@ void main() {
style: DiagnosticsTreeStyle.whitespace, style: DiagnosticsTreeStyle.whitespace,
); );
expect(multiLineProperty.value, equals(objects)); expect(multiLineProperty.value, equals(objects));
expect(multiLineProperty.hidden, isFalse); expect(multiLineProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect( expect(
multiLineProperty.toString(), multiLineProperty.toString(),
equals( equals(
...@@ -1335,7 +1348,7 @@ void main() { ...@@ -1335,7 +1348,7 @@ void main() {
style: DiagnosticsTreeStyle.whitespace, style: DiagnosticsTreeStyle.whitespace,
); );
expect(objectProperty.value, equals(singleElementList)); expect(objectProperty.value, equals(singleElementList));
expect(objectProperty.hidden, isFalse); expect(objectProperty.isFiltered(DiagnosticLevel.info), isFalse);
expect( expect(
objectProperty.toString(), objectProperty.toString(),
equals('object: Color(0xffffffff)'), equals('object: Color(0xffffffff)'),
......
...@@ -71,7 +71,7 @@ void main() { ...@@ -71,7 +71,7 @@ void main() {
); );
expect(coloredBox, hasAGoodToStringDeep); expect(coloredBox, hasAGoodToStringDeep);
expect(coloredBox.toStringDeep(), equalsIgnoringHashCodes( expect(coloredBox.toStringDeep(minLevel: DiagnosticLevel.info), equalsIgnoringHashCodes(
'RenderDecoratedBox#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderDecoratedBox#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' parentData: MISSING\n' ' parentData: MISSING\n'
' constraints: MISSING\n' ' constraints: MISSING\n'
...@@ -94,7 +94,7 @@ void main() { ...@@ -94,7 +94,7 @@ void main() {
expect(coloredBox, hasAGoodToStringDeep); expect(coloredBox, hasAGoodToStringDeep);
expect( expect(
coloredBox.toStringDeep(), coloredBox.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderDecoratedBox#00000 NEEDS-PAINT\n' 'RenderDecoratedBox#00000 NEEDS-PAINT\n'
' parentData: offset=Offset(10.0, 10.0) (can use size)\n' ' parentData: offset=Offset(10.0, 10.0) (can use size)\n'
......
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
expect(editable.getMaxIntrinsicHeight(double.INFINITY), 10.0); expect(editable.getMaxIntrinsicHeight(double.INFINITY), 10.0);
expect( expect(
editable.toStringDeep(), editable.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderEditable#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderEditable#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' │ parentData: MISSING\n' ' │ parentData: MISSING\n'
......
...@@ -88,7 +88,7 @@ void main() { ...@@ -88,7 +88,7 @@ void main() {
expect(flex.direction, equals(Axis.horizontal)); expect(flex.direction, equals(Axis.horizontal));
expect(flex, hasAGoodToStringDeep); expect(flex, hasAGoodToStringDeep);
expect( expect(
flex.toStringDeep(), flex.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderFlex#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderFlex#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' parentData: MISSING\n' ' parentData: MISSING\n'
......
...@@ -67,7 +67,7 @@ void main() { ...@@ -67,7 +67,7 @@ void main() {
expect(image, hasAGoodToStringDeep); expect(image, hasAGoodToStringDeep);
expect( expect(
image.toStringDeep(), image.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderImage#00000 relayoutBoundary=up2 NEEDS-PAINT\n' 'RenderImage#00000 relayoutBoundary=up2 NEEDS-PAINT\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
......
...@@ -30,7 +30,7 @@ void main() { ...@@ -30,7 +30,7 @@ void main() {
expect(parent, hasAGoodToStringDeep); expect(parent, hasAGoodToStringDeep);
expect( expect(
parent.toStringDeep(), parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n' 'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
...@@ -116,7 +116,7 @@ void main() { ...@@ -116,7 +116,7 @@ void main() {
expect(parent, hasAGoodToStringDeep); expect(parent, hasAGoodToStringDeep);
expect( expect(
parent.toStringDeep(), parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n' 'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
...@@ -152,7 +152,7 @@ void main() { ...@@ -152,7 +152,7 @@ void main() {
expect(parent, hasAGoodToStringDeep); expect(parent, hasAGoodToStringDeep);
expect( expect(
parent.toStringDeep(), parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n' 'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
......
...@@ -229,7 +229,7 @@ void main() { ...@@ -229,7 +229,7 @@ void main() {
); );
expect(paragraph, hasAGoodToStringDeep); expect(paragraph, hasAGoodToStringDeep);
expect( expect(
paragraph.toStringDeep(), paragraph.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderParagraph#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderParagraph#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' │ parentData: MISSING\n' ' │ parentData: MISSING\n'
......
...@@ -169,11 +169,17 @@ void main() { ...@@ -169,11 +169,17 @@ void main() {
}); });
test('debug properties', () { test('debug properties', () {
final SemanticsNode minimalProperties = new SemanticsNode();
expect( expect(
new SemanticsNode().toStringDeep(), minimalProperties.toStringDeep(),
'SemanticsNode#16(Rect.fromLTRB(0.0, 0.0, 0.0, 0.0))\n', 'SemanticsNode#16(Rect.fromLTRB(0.0, 0.0, 0.0, 0.0))\n',
); );
expect(
minimalProperties.toStringDeep(minLevel: DiagnosticLevel.hidden),
'SemanticsNode#16(owner: null, shouldMergeAllDescendantsIntoThisNode: false, Rect.fromLTRB(0.0, 0.0, 0.0, 0.0), wasAffectedByClip: false, actions: [], tags: [], isSelected: false, label: "", textDirection: null)\n',
);
final SemanticsNode allProperties = new SemanticsNode() final SemanticsNode allProperties = new SemanticsNode()
..rect = new Rect.fromLTWH(50.0, 10.0, 20.0, 30.0) ..rect = new Rect.fromLTWH(50.0, 10.0, 20.0, 30.0)
..mergeAllDescendantsIntoThisNode = true ..mergeAllDescendantsIntoThisNode = true
......
...@@ -16,7 +16,7 @@ void main() { ...@@ -16,7 +16,7 @@ void main() {
); );
expect(root, hasAGoodToStringDeep); expect(root, hasAGoodToStringDeep);
expect( expect(
root.toStringDeep(), root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' parentData: MISSING\n' ' parentData: MISSING\n'
...@@ -32,7 +32,7 @@ void main() { ...@@ -32,7 +32,7 @@ void main() {
root.offset = new ViewportOffset.fixed(900.0); root.offset = new ViewportOffset.fixed(900.0);
expect(root, hasAGoodToStringDeep); expect(root, hasAGoodToStringDeep);
expect( expect(
root.toStringDeep(), root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT\n' 'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT\n'
' parentData: <none>\n' ' parentData: <none>\n'
...@@ -69,7 +69,7 @@ void main() { ...@@ -69,7 +69,7 @@ void main() {
expect(root, hasAGoodToStringDeep); expect(root, hasAGoodToStringDeep);
expect( expect(
root.toStringDeep(), root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-PAINT\n' 'RenderViewport#00000 NEEDS-PAINT\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
......
...@@ -23,7 +23,7 @@ void main() { ...@@ -23,7 +23,7 @@ void main() {
expect(table, hasAGoodToStringDeep); expect(table, hasAGoodToStringDeep);
expect( expect(
table.toStringDeep(), table.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderTable#00000 NEEDS-PAINT\n' 'RenderTable#00000 NEEDS-PAINT\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
...@@ -74,7 +74,7 @@ void main() { ...@@ -74,7 +74,7 @@ void main() {
expect(table, hasAGoodToStringDeep); expect(table, hasAGoodToStringDeep);
expect( expect(
table.toStringDeep(), table.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderTable#00000 relayoutBoundary=up1 NEEDS-PAINT\n' 'RenderTable#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' │ parentData: offset=Offset(335.0, 185.0) (can use size)\n' ' │ parentData: offset=Offset(335.0, 185.0) (can use size)\n'
......
...@@ -10,7 +10,7 @@ void main() { ...@@ -10,7 +10,7 @@ void main() {
final RenderWrap renderWrap = new RenderWrap(); final RenderWrap renderWrap = new RenderWrap();
expect(renderWrap, hasAGoodToStringDeep); expect(renderWrap, hasAGoodToStringDeep);
expect( expect(
renderWrap.toStringDeep(), renderWrap.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderWrap#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n' 'RenderWrap#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' parentData: MISSING\n' ' parentData: MISSING\n'
......
...@@ -68,11 +68,9 @@ void main() { ...@@ -68,11 +68,9 @@ void main() {
expect(box, hasAGoodToStringDeep); expect(box, hasAGoodToStringDeep);
expect( expect(
box.toStringDeep(), box.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderDecoratedBox#00000\n' 'RenderDecoratedBox#00000\n'
' │ creator: DecoratedBox ← Container ←\n'
' │ AnimatedContainer-[GlobalKey#00000] ← [root]\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -83,8 +81,6 @@ void main() { ...@@ -83,8 +81,6 @@ void main() {
' │ android)\n' ' │ android)\n'
' │\n' ' │\n'
' └─child: RenderLimitedBox#00000\n' ' └─child: RenderLimitedBox#00000\n'
' │ creator: LimitedBox ← DecoratedBox ← Container ←\n'
' │ AnimatedContainer-[GlobalKey#00000] ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -92,8 +88,6 @@ void main() { ...@@ -92,8 +88,6 @@ void main() {
' │ maxHeight: 0.0\n' ' │ maxHeight: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000\n' ' └─child: RenderConstrainedBox#00000\n'
' creator: ConstrainedBox ← LimitedBox ← DecoratedBox ← Container ←\n'
' AnimatedContainer-[GlobalKey#00000] ← [root]\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=800.0, h=600.0)\n' ' constraints: BoxConstraints(w=800.0, h=600.0)\n'
' size: Size(800.0, 600.0)\n' ' size: Size(800.0, 600.0)\n'
......
...@@ -81,11 +81,9 @@ void main() { ...@@ -81,11 +81,9 @@ void main() {
expect(box, hasAGoodToStringDeep); expect(box, hasAGoodToStringDeep);
expect( expect(
box.toStringDeep(), box.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderLimitedBox#00000\n' 'RenderLimitedBox#00000\n'
' │ creator: LimitedBox ← Container-[GlobalKey#00000] ← Positioned ←\n'
' │ AnimatedPositioned ← Stack ← [root]\n'
' │ parentData: top=31.0; left=37.0; width=59.0; height=71.0;\n' ' │ parentData: top=31.0; left=37.0; width=59.0; height=71.0;\n'
' │ offset=Offset(37.0, 31.0) (can use size)\n' ' │ offset=Offset(37.0, 31.0) (can use size)\n'
' │ constraints: BoxConstraints(w=59.0, h=71.0)\n' ' │ constraints: BoxConstraints(w=59.0, h=71.0)\n'
...@@ -94,9 +92,6 @@ void main() { ...@@ -94,9 +92,6 @@ void main() {
' │ maxHeight: 0.0\n' ' │ maxHeight: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000\n' ' └─child: RenderConstrainedBox#00000\n'
' creator: ConstrainedBox ← LimitedBox ←\n'
' Container-[GlobalKey#00000] ← Positioned ← AnimatedPositioned ←\n'
' Stack ← [root]\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=59.0, h=71.0)\n' ' constraints: BoxConstraints(w=59.0, h=71.0)\n'
' size: Size(59.0, 71.0)\n' ' size: Size(59.0, 71.0)\n'
......
...@@ -52,19 +52,296 @@ void main() { ...@@ -52,19 +52,296 @@ void main() {
expect(box, hasAGoodToStringDeep); expect(box, hasAGoodToStringDeep);
expect( expect(
box.toStringDeep(), box.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderPadding#00000 relayoutBoundary=up1\n'
' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
' │ size: Size(63.0, 88.0)\n'
' │ padding: EdgeInsets.all(5.0)\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0x7f0000ff)\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0xff00ff00)\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderPadding#00000\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ padding: EdgeInsets.all(7.0)\n'
' │\n'
' └─child: RenderPositionedBox#00000\n'
' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n'
' │ constraints: BoxConstraints(w=39.0, h=64.0)\n'
' │ size: Size(39.0, 64.0)\n'
' │ alignment: FractionalOffset.bottomRight\n'
' │ widthFactor: expand\n'
' │ heightFactor: expand\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up1\n'
' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=39.0, 0.0<=h<=64.0)\n'
' │ size: Size(25.0, 33.0)\n'
' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=25.0, h=33.0)\n'
' size: Size(25.0, 33.0)\n'
' decoration: BoxDecoration:\n'
' color: Color(0xffffff00)\n'
' configuration: ImageConfiguration(bundle:\n'
' PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' android)\n',
),
);
expect(
box.toStringDeep(minLevel: DiagnosticLevel.debug),
equalsIgnoringHashCodes(
'RenderPadding#00000 relayoutBoundary=up1\n'
' │ creator: Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
' │ size: Size(63.0, 88.0)\n'
' │ padding: EdgeInsets.all(5.0)\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ creator: ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ creator: DecoratedBox ← ConstrainedBox ← Padding ← Container ←\n'
' │ Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0x7f0000ff)\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ creator: DecoratedBox ← DecoratedBox ← ConstrainedBox ← Padding ←\n'
' │ Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0xff00ff00)\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderPadding#00000\n'
' │ creator: Padding ← DecoratedBox ← DecoratedBox ← ConstrainedBox ←\n'
' │ Padding ← Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ size: Size(53.0, 78.0)\n'
' │ padding: EdgeInsets.all(7.0)\n'
' │\n'
' └─child: RenderPositionedBox#00000\n'
' │ creator: Align ← Padding ← DecoratedBox ← DecoratedBox ←\n'
' │ ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n'
' │ constraints: BoxConstraints(w=39.0, h=64.0)\n'
' │ size: Size(39.0, 64.0)\n'
' │ alignment: FractionalOffset.bottomRight\n'
' │ widthFactor: expand\n'
' │ heightFactor: expand\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up1\n'
' │ creator: SizedBox ← Align ← Padding ← DecoratedBox ← DecoratedBox\n'
' │ ← ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=39.0, 0.0<=h<=64.0)\n'
' │ size: Size(25.0, 33.0)\n'
' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' creator: DecoratedBox ← SizedBox ← Align ← Padding ← DecoratedBox\n'
' ← DecoratedBox ← ConstrainedBox ← Padding ← Container ← Align ←\n'
' [root]\n'
' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=25.0, h=33.0)\n'
' size: Size(25.0, 33.0)\n'
' decoration: BoxDecoration:\n'
' color: Color(0xffffff00)\n'
' configuration: ImageConfiguration(bundle:\n'
' PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' android)\n',
),
);
expect(
box.toStringDeep(minLevel: DiagnosticLevel.fine),
equalsIgnoringHashCodes(
'RenderPadding#00000 relayoutBoundary=up1\n'
' │ creator: Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(63.0, 88.0)\n'
' │ padding: EdgeInsets.all(5.0)\n'
' │ textDirection: null\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ creator: ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(53.0, 78.0)\n'
' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ creator: DecoratedBox ← ConstrainedBox ← Padding ← Container ←\n'
' │ Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0x7f0000ff)\n'
' │ image: null\n'
' │ border: null\n'
' │ borderRadius: null\n'
' │ boxShadow: null\n'
' │ gradient: null\n'
' │ shape: rectangle\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ creator: DecoratedBox ← DecoratedBox ← ConstrainedBox ← Padding ←\n'
' │ Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n'
' │ color: Color(0xff00ff00)\n'
' │ image: null\n'
' │ border: null\n'
' │ borderRadius: null\n'
' │ boxShadow: null\n'
' │ gradient: null\n'
' │ shape: rectangle\n'
' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n'
' │\n'
' └─child: RenderPadding#00000\n'
' │ creator: Padding ← DecoratedBox ← DecoratedBox ← ConstrainedBox ←\n'
' │ Padding ← Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(53.0, 78.0)\n'
' │ padding: EdgeInsets.all(7.0)\n'
' │ textDirection: null\n'
' │\n'
' └─child: RenderPositionedBox#00000\n'
' │ creator: Align ← Padding ← DecoratedBox ← DecoratedBox ←\n'
' │ ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n'
' │ constraints: BoxConstraints(w=39.0, h=64.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(39.0, 64.0)\n'
' │ alignment: FractionalOffset.bottomRight\n'
' │ textDirection: null\n'
' │ widthFactor: expand\n'
' │ heightFactor: expand\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up1\n'
' │ creator: SizedBox ← Align ← Padding ← DecoratedBox ← DecoratedBox\n'
' │ ← ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=39.0, 0.0<=h<=64.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ size: Size(25.0, 33.0)\n'
' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' creator: DecoratedBox ← SizedBox ← Align ← Padding ← DecoratedBox\n'
' ← DecoratedBox ← ConstrainedBox ← Padding ← Container ← Align ←\n'
' [root]\n'
' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=25.0, h=33.0)\n'
' layer: null\n'
' semantics node: null\n'
' size: Size(25.0, 33.0)\n'
' decoration: BoxDecoration:\n'
' color: Color(0xffffff00)\n'
' image: null\n'
' border: null\n'
' borderRadius: null\n'
' boxShadow: null\n'
' gradient: null\n'
' shape: rectangle\n'
' configuration: ImageConfiguration(bundle:\n'
' PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' android)\n',
),
);
expect(
box.toStringDeep(minLevel: DiagnosticLevel.hidden),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderPadding#00000 relayoutBoundary=up1\n' 'RenderPadding#00000 relayoutBoundary=up1\n'
' │ creator: Padding ← Container ← Align ← [root]\n' ' │ creator: Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n' ' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(63.0, 88.0)\n' ' │ size: Size(63.0, 88.0)\n'
' │ padding: EdgeInsets.all(5.0)\n' ' │ padding: EdgeInsets.all(5.0)\n'
' │ textDirection: null\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n' ' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ creator: ConstrainedBox ← Padding ← Container ← Align ← [root]\n' ' │ creator: ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n' ' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n' ' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(53.0, 78.0)\n' ' │ size: Size(53.0, 78.0)\n'
' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n' ' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n'
' │\n' ' │\n'
...@@ -73,9 +350,19 @@ void main() { ...@@ -73,9 +350,19 @@ void main() {
' │ Align ← [root]\n' ' │ Align ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n' ' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(53.0, 78.0)\n' ' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n' ' │ decoration: BoxDecoration:\n'
' │ color: Color(0x7f0000ff)\n' ' │ color: Color(0x7f0000ff)\n'
' │ image: null\n'
' │ border: null\n'
' │ borderRadius: null\n'
' │ boxShadow: null\n'
' │ gradient: null\n'
' │ shape: rectangle\n'
' │ configuration: ImageConfiguration(bundle:\n' ' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n' ' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n' ' │ android)\n'
...@@ -85,9 +372,19 @@ void main() { ...@@ -85,9 +372,19 @@ void main() {
' │ Container ← Align ← [root]\n' ' │ Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n' ' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(53.0, 78.0)\n' ' │ size: Size(53.0, 78.0)\n'
' │ decoration: BoxDecoration:\n' ' │ decoration: BoxDecoration:\n'
' │ color: Color(0xff00ff00)\n' ' │ color: Color(0xff00ff00)\n'
' │ image: null\n'
' │ border: null\n'
' │ borderRadius: null\n'
' │ boxShadow: null\n'
' │ gradient: null\n'
' │ shape: rectangle\n'
' │ configuration: ImageConfiguration(bundle:\n' ' │ configuration: ImageConfiguration(bundle:\n'
' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n' ' │ PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' │ android)\n' ' │ android)\n'
...@@ -97,16 +394,26 @@ void main() { ...@@ -97,16 +394,26 @@ void main() {
' │ Padding ← Container ← Align ← [root]\n' ' │ Padding ← Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=53.0, h=78.0)\n' ' │ constraints: BoxConstraints(w=53.0, h=78.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(53.0, 78.0)\n' ' │ size: Size(53.0, 78.0)\n'
' │ padding: EdgeInsets.all(7.0)\n' ' │ padding: EdgeInsets.all(7.0)\n'
' │ textDirection: null\n'
' │\n' ' │\n'
' └─child: RenderPositionedBox#00000\n' ' └─child: RenderPositionedBox#00000\n'
' │ creator: Align ← Padding ← DecoratedBox ← DecoratedBox ←\n' ' │ creator: Align ← Padding ← DecoratedBox ← DecoratedBox ←\n'
' │ ConstrainedBox ← Padding ← Container ← Align ← [root]\n' ' │ ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n' ' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n'
' │ constraints: BoxConstraints(w=39.0, h=64.0)\n' ' │ constraints: BoxConstraints(w=39.0, h=64.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(39.0, 64.0)\n' ' │ size: Size(39.0, 64.0)\n'
' │ alignment: FractionalOffset.bottomRight\n' ' │ alignment: FractionalOffset.bottomRight\n'
' │ textDirection: null\n'
' │ widthFactor: expand\n' ' │ widthFactor: expand\n'
' │ heightFactor: expand\n' ' │ heightFactor: expand\n'
' │\n' ' │\n'
...@@ -115,6 +422,10 @@ void main() { ...@@ -115,6 +422,10 @@ void main() {
' │ ← ConstrainedBox ← Padding ← Container ← Align ← [root]\n' ' │ ← ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n' ' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=39.0, 0.0<=h<=64.0)\n' ' │ constraints: BoxConstraints(0.0<=w<=39.0, 0.0<=h<=64.0)\n'
' │ layer: null\n'
' │ semantics node: null\n'
' │ isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' │ isSemanticBoundary: false\n'
' │ size: Size(25.0, 33.0)\n' ' │ size: Size(25.0, 33.0)\n'
' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n' ' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n'
' │\n' ' │\n'
...@@ -124,9 +435,19 @@ void main() { ...@@ -124,9 +435,19 @@ void main() {
' [root]\n' ' [root]\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=25.0, h=33.0)\n' ' constraints: BoxConstraints(w=25.0, h=33.0)\n'
' layer: null\n'
' semantics node: null\n'
' isBlockingSemanticsOfPreviouslyPaintedNodes: false\n'
' isSemanticBoundary: false\n'
' size: Size(25.0, 33.0)\n' ' size: Size(25.0, 33.0)\n'
' decoration: BoxDecoration:\n' ' decoration: BoxDecoration:\n'
' color: Color(0xffffff00)\n' ' color: Color(0xffffff00)\n'
' image: null\n'
' border: null\n'
' borderRadius: null\n'
' boxShadow: null\n'
' gradient: null\n'
' shape: rectangle\n'
' configuration: ImageConfiguration(bundle:\n' ' configuration: ImageConfiguration(bundle:\n'
' PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n' ' PlatformAssetBundle#00000(), devicePixelRatio: 1.0, platform:\n'
' android)\n', ' android)\n',
......
...@@ -170,7 +170,7 @@ void main() { ...@@ -170,7 +170,7 @@ void main() {
expect(parentFocusScope, hasAGoodToStringDeep); expect(parentFocusScope, hasAGoodToStringDeep);
expect( expect(
parentFocusScope.toStringDeep(), parentFocusScope.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'FocusScopeNode#00000\n' 'FocusScopeNode#00000\n'
' focus: FocusNode#00000(FOCUSED)\n' ' focus: FocusNode#00000(FOCUSED)\n'
...@@ -179,7 +179,7 @@ void main() { ...@@ -179,7 +179,7 @@ void main() {
expect(WidgetsBinding.instance.focusManager.rootScope, hasAGoodToStringDeep); expect(WidgetsBinding.instance.focusManager.rootScope, hasAGoodToStringDeep);
expect( expect(
WidgetsBinding.instance.focusManager.rootScope.toStringDeep(), WidgetsBinding.instance.focusManager.rootScope.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'FocusScopeNode#00000\n' 'FocusScopeNode#00000\n'
' └─child 1: FocusScopeNode#00000\n' ' └─child 1: FocusScopeNode#00000\n'
......
...@@ -190,7 +190,7 @@ void main() { ...@@ -190,7 +190,7 @@ void main() {
), ),
); );
// The important lines below are the ones marked with "<----" // The important lines below are the ones marked with "<----"
expect(tester.binding.renderView.toStringDeep(), equalsIgnoringHashCodes( expect(tester.binding.renderView.toStringDeep(minLevel: DiagnosticLevel.info), equalsIgnoringHashCodes(
'RenderView#00000\n' 'RenderView#00000\n'
' │ debug mode enabled - ${Platform.operatingSystem}\n' ' │ debug mode enabled - ${Platform.operatingSystem}\n'
' │ window size: Size(2400.0, 1800.0) (in physical pixels)\n' ' │ window size: Size(2400.0, 1800.0) (in physical pixels)\n'
...@@ -198,10 +198,6 @@ void main() { ...@@ -198,10 +198,6 @@ void main() {
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n' ' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n'
' │\n' ' │\n'
' └─child: RenderRepaintBoundary#00000\n' ' └─child: RenderRepaintBoundary#00000\n'
' │ creator: RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -211,19 +207,11 @@ void main() { ...@@ -211,19 +207,11 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderCustomPaint#00000\n' ' └─child: RenderCustomPaint#00000\n'
' │ creator: CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
' │\n' ' │\n'
' └─child: RenderRepaintBoundary#00000\n' ' └─child: RenderRepaintBoundary#00000\n'
' │ creator: RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -233,12 +221,6 @@ void main() { ...@@ -233,12 +221,6 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderSemanticsGestureHandler#00000\n' ' └─child: RenderSemanticsGestureHandler#00000\n'
' │ creator: _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ semantic boundary\n' ' │ semantic boundary\n'
...@@ -246,12 +228,6 @@ void main() { ...@@ -246,12 +228,6 @@ void main() {
' │ gestures: vertical scroll\n' ' │ gestures: vertical scroll\n'
' │\n' ' │\n'
' └─child: RenderPointerListener#00000\n' ' └─child: RenderPointerListener#00000\n'
' │ creator: Listener ← _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -259,13 +235,6 @@ void main() { ...@@ -259,13 +235,6 @@ void main() {
' │ listeners: down\n' ' │ listeners: down\n'
' │\n' ' │\n'
' └─child: RenderIgnorePointer#00000\n' ' └─child: RenderIgnorePointer#00000\n'
' │ creator: IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -273,13 +242,6 @@ void main() { ...@@ -273,13 +242,6 @@ void main() {
' │ ignoringSemantics: implicitly false\n' ' │ ignoringSemantics: implicitly false\n'
' │\n' ' │\n'
' └─child: RenderViewport#00000\n' ' └─child: RenderViewport#00000\n'
' │ creator: Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -293,13 +255,6 @@ void main() { ...@@ -293,13 +255,6 @@ void main() {
' │ anchor: 0.0\n' ' │ anchor: 0.0\n'
' │\n' ' │\n'
' └─center child: RenderSliverFixedExtentList#00000 relayoutBoundary=up1\n' ' └─center child: RenderSliverFixedExtentList#00000 relayoutBoundary=up1\n'
' │ creator: SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← ⋯\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n' ' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
...@@ -311,13 +266,6 @@ void main() { ...@@ -311,13 +266,6 @@ void main() {
' │ currently live children: 0 to 1\n' ' │ currently live children: 0 to 1\n'
' │\n' ' │\n'
' ├─child with index 0: RenderLimitedBox#00000\n' ' ├─child with index 0: RenderLimitedBox#00000\n'
' │ │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ │ ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← ⋯\n'
' │ │ parentData: index=0; layoutOffset=0.0\n' ' │ │ parentData: index=0; layoutOffset=0.0\n'
' │ │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ │ size: Size(800.0, 400.0)\n' ' │ │ size: Size(800.0, 400.0)\n'
...@@ -325,25 +273,11 @@ void main() { ...@@ -325,25 +273,11 @@ void main() {
' │ │ maxHeight: 400.0\n' ' │ │ maxHeight: 400.0\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderCustomPaint#00000\n' ' │ └─child: RenderCustomPaint#00000\n'
' │ creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ size: Size(800.0, 400.0)\n' ' │ size: Size(800.0, 400.0)\n'
' │\n' ' │\n'
' └─child with index 1: RenderLimitedBox#00000\n' // <----- no dashed line starts here ' └─child with index 1: RenderLimitedBox#00000\n' // <----- no dashed line starts here
' │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← ⋯\n'
' │ parentData: index=1; layoutOffset=400.0\n' ' │ parentData: index=1; layoutOffset=400.0\n'
' │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ size: Size(800.0, 400.0)\n' ' │ size: Size(800.0, 400.0)\n'
...@@ -351,13 +285,6 @@ void main() { ...@@ -351,13 +285,6 @@ void main() {
' │ maxHeight: 400.0\n' ' │ maxHeight: 400.0\n'
' │\n' ' │\n'
' └─child: RenderCustomPaint#00000\n' ' └─child: RenderCustomPaint#00000\n'
' creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ←\n'
' RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ← ⋯\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=800.0, h=400.0)\n' ' constraints: BoxConstraints(w=800.0, h=400.0)\n'
' size: Size(800.0, 400.0)\n' ' size: Size(800.0, 400.0)\n'
...@@ -368,7 +295,7 @@ void main() { ...@@ -368,7 +295,7 @@ void main() {
const GlobalObjectKey<_LeafState>(3).currentState.setKeepAlive(true); const GlobalObjectKey<_LeafState>(3).currentState.setKeepAlive(true);
await tester.drag(find.byType(ListView), const Offset(0.0, -1000.0)); await tester.drag(find.byType(ListView), const Offset(0.0, -1000.0));
await tester.pump(); await tester.pump();
expect(tester.binding.renderView.toStringDeep(), equalsIgnoringHashCodes( expect(tester.binding.renderView.toStringDeep(minLevel: DiagnosticLevel.info), equalsIgnoringHashCodes(
'RenderView#00000\n' 'RenderView#00000\n'
' │ debug mode enabled - ${Platform.operatingSystem}\n' ' │ debug mode enabled - ${Platform.operatingSystem}\n'
' │ window size: Size(2400.0, 1800.0) (in physical pixels)\n' ' │ window size: Size(2400.0, 1800.0) (in physical pixels)\n'
...@@ -376,10 +303,6 @@ void main() { ...@@ -376,10 +303,6 @@ void main() {
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n' ' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n'
' │\n' ' │\n'
' └─child: RenderRepaintBoundary#00000\n' ' └─child: RenderRepaintBoundary#00000\n'
' │ creator: RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -389,19 +312,11 @@ void main() { ...@@ -389,19 +312,11 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderCustomPaint#00000\n' ' └─child: RenderCustomPaint#00000\n'
' │ creator: CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
' │\n' ' │\n'
' └─child: RenderRepaintBoundary#00000\n' ' └─child: RenderRepaintBoundary#00000\n'
' │ creator: RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -411,12 +326,6 @@ void main() { ...@@ -411,12 +326,6 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderSemanticsGestureHandler#00000\n' ' └─child: RenderSemanticsGestureHandler#00000\n'
' │ creator: _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ semantic boundary\n' ' │ semantic boundary\n'
...@@ -424,12 +333,6 @@ void main() { ...@@ -424,12 +333,6 @@ void main() {
' │ gestures: vertical scroll\n' ' │ gestures: vertical scroll\n'
' │\n' ' │\n'
' └─child: RenderPointerListener#00000\n' ' └─child: RenderPointerListener#00000\n'
' │ creator: Listener ← _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← [root]\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -437,13 +340,6 @@ void main() { ...@@ -437,13 +340,6 @@ void main() {
' │ listeners: down\n' ' │ listeners: down\n'
' │\n' ' │\n'
' └─child: RenderIgnorePointer#00000\n' ' └─child: RenderIgnorePointer#00000\n'
' │ creator: IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ListView ←\n'
' │ Directionality ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
...@@ -451,13 +347,6 @@ void main() { ...@@ -451,13 +347,6 @@ void main() {
' │ ignoringSemantics: implicitly false\n' ' │ ignoringSemantics: implicitly false\n'
' │\n' ' │\n'
' └─child: RenderViewport#00000\n' ' └─child: RenderViewport#00000\n'
' │ creator: Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← Scrollable ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -471,13 +360,6 @@ void main() { ...@@ -471,13 +360,6 @@ void main() {
' │ anchor: 0.0\n' ' │ anchor: 0.0\n'
' │\n' ' │\n'
' └─center child: RenderSliverFixedExtentList#00000 relayoutBoundary=up1\n' ' └─center child: RenderSliverFixedExtentList#00000 relayoutBoundary=up1\n'
' │ creator: SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← ⋯\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n' ' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
...@@ -489,13 +371,6 @@ void main() { ...@@ -489,13 +371,6 @@ void main() {
' │ currently live children: 5 to 6\n' ' │ currently live children: 5 to 6\n'
' │\n' ' │\n'
' ├─child with index 5: RenderLimitedBox#00000\n' // <----- this is index 5, not 0 ' ├─child with index 5: RenderLimitedBox#00000\n' // <----- this is index 5, not 0
' │ │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ │ ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← ⋯\n'
' │ │ parentData: index=5; layoutOffset=2000.0\n' ' │ │ parentData: index=5; layoutOffset=2000.0\n'
' │ │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ │ size: Size(800.0, 400.0)\n' ' │ │ size: Size(800.0, 400.0)\n'
...@@ -503,25 +378,11 @@ void main() { ...@@ -503,25 +378,11 @@ void main() {
' │ │ maxHeight: 400.0\n' ' │ │ maxHeight: 400.0\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderCustomPaint#00000\n' ' │ └─child: RenderCustomPaint#00000\n'
' │ creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ size: Size(800.0, 400.0)\n' ' │ size: Size(800.0, 400.0)\n'
' │\n' ' │\n'
' ├─child with index 6: RenderLimitedBox#00000\n' ' ├─child with index 6: RenderLimitedBox#00000\n'
' ╎ │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n' // <----- the line starts becoming dashed here
' ╎ │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' ╎ │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' ╎ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ╎ │ ←\n'
' ╎ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ╎ │ ← RepaintBoundary ← ⋯\n'
' ╎ │ parentData: index=6; layoutOffset=2400.0\n' ' ╎ │ parentData: index=6; layoutOffset=2400.0\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' ╎ │ size: Size(800.0, 400.0)\n' ' ╎ │ size: Size(800.0, 400.0)\n'
...@@ -529,25 +390,11 @@ void main() { ...@@ -529,25 +390,11 @@ void main() {
' ╎ │ maxHeight: 400.0\n' ' ╎ │ maxHeight: 400.0\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child: RenderCustomPaint#00000\n' ' ╎ └─child: RenderCustomPaint#00000\n'
' ╎ creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' ╎ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' ╎ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' ╎ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ╎ ←\n'
' ╎ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ╎ ← ⋯\n'
' ╎ parentData: <none> (can use size)\n' ' ╎ parentData: <none> (can use size)\n'
' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' ╎ size: Size(800.0, 400.0)\n' ' ╎ size: Size(800.0, 400.0)\n'
' ╎\n' ' ╎\n'
' ╎╌child with index 0 (kept alive offstage): RenderLimitedBox#00000\n' // <----- this one is index 0 and is marked as being offstage ' ╎╌child with index 0 (kept alive offstage): RenderLimitedBox#00000\n' // <----- this one is index 0 and is marked as being offstage
' ╎ │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n'
' ╎ │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' ╎ │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' ╎ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ╎ │ ←\n'
' ╎ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ╎ │ ← RepaintBoundary ← ⋯\n'
' ╎ │ parentData: index=0; keepAlive; layoutOffset=0.0\n' ' ╎ │ parentData: index=0; keepAlive; layoutOffset=0.0\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' ╎ │ size: Size(800.0, 400.0)\n' ' ╎ │ size: Size(800.0, 400.0)\n'
...@@ -555,25 +402,11 @@ void main() { ...@@ -555,25 +402,11 @@ void main() {
' ╎ │ maxHeight: 400.0\n' ' ╎ │ maxHeight: 400.0\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child: RenderCustomPaint#00000\n' ' ╎ └─child: RenderCustomPaint#00000\n'
' ╎ creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' ╎ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' ╎ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' ╎ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ╎ ←\n'
' ╎ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ╎ ← ⋯\n'
' ╎ parentData: <none> (can use size)\n' ' ╎ parentData: <none> (can use size)\n'
' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' ╎ size: Size(800.0, 400.0)\n' ' ╎ size: Size(800.0, 400.0)\n'
' ╎\n' // <----- dashed line ends here ' ╎\n' // <----- dashed line ends here
' └╌child with index 3 (kept alive offstage): RenderLimitedBox#00000\n' ' └╌child with index 3 (kept alive offstage): RenderLimitedBox#00000\n'
' │ creator: LimitedBox ← Placeholder ← KeepAlive ←\n'
' │ Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' │ SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← ⋯\n'
' │ parentData: index=3; keepAlive; layoutOffset=1200.0\n' ' │ parentData: index=3; keepAlive; layoutOffset=1200.0\n'
' │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
' │ size: Size(800.0, 400.0)\n' ' │ size: Size(800.0, 400.0)\n'
...@@ -581,17 +414,9 @@ void main() { ...@@ -581,17 +414,9 @@ void main() {
' │ maxHeight: 400.0\n' ' │ maxHeight: 400.0\n'
' │\n' ' │\n'
' └─child: RenderCustomPaint#00000\n' ' └─child: RenderCustomPaint#00000\n'
' creator: CustomPaint ← LimitedBox ← Placeholder ← KeepAlive ←\n'
' Leaf-[GlobalObjectKey<_LeafState> int#00000] ←\n'
' SliverFixedExtentList ← Viewport ← _ScrollableScope ←\n'
' IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' ←\n'
' RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ← ⋯\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=800.0, h=400.0)\n' ' constraints: BoxConstraints(w=800.0, h=400.0)\n'
' size: Size(800.0, 400.0)\n' ' size: Size(800.0, 400.0)\n'
'' // TODO(ianh): remove blank line
)); ));
}); });
......
...@@ -300,16 +300,9 @@ void main() { ...@@ -300,16 +300,9 @@ void main() {
expect(list, hasAGoodToStringDeep); expect(list, hasAGoodToStringDeep);
expect( expect(
list.toStringDeep(), list.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderSliverList#00000 relayoutBoundary=up1\n' 'RenderSliverList#00000 relayoutBoundary=up1\n'
' │ creator: SliverList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← ⋯\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n' ' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
...@@ -321,12 +314,6 @@ void main() { ...@@ -321,12 +314,6 @@ void main() {
' │ currently live children: 0 to 2\n' ' │ currently live children: 0 to 2\n'
' │\n' ' │\n'
' ├─child with index 0: RenderRepaintBoundary#00000 relayoutBoundary=up2\n' ' ├─child with index 0: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ │ creator: RepaintBoundary-[<0>] ← SliverList ← Viewport ←\n'
' │ │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ │ _GestureSemantics ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ │ NotificationListener<ScrollNotification> ← ⋯\n'
' │ │ parentData: index=0; layoutOffset=0.0 (can use size)\n' ' │ │ parentData: index=0; layoutOffset=0.0 (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ layer: OffsetLayer#00000\n' ' │ │ layer: OffsetLayer#00000\n'
...@@ -336,24 +323,12 @@ void main() { ...@@ -336,24 +323,12 @@ void main() {
' │ │ repaints)\n' ' │ │ repaints)\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n' ' │ └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n'
' │ │ creator: ConstrainedBox ← Container ← RepaintBoundary-[<0>] ←\n'
' │ │ SliverList ← Viewport ← _ScrollableScope ←\n'
' │ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ │ ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← CustomPaint ← ⋯\n'
' │ │ parentData: <none> (can use size)\n' ' │ │ parentData: <none> (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ size: Size(800.0, 100.0)\n' ' │ │ size: Size(800.0, 100.0)\n'
' │ │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n' ' │ │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderLimitedBox#00000\n' ' │ └─child: RenderLimitedBox#00000\n'
' │ │ creator: LimitedBox ← ConstrainedBox ← Container ←\n'
' │ │ RepaintBoundary-[<0>] ← SliverList ← Viewport ←\n'
' │ │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ │ _GestureSemantics ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← ⋯\n'
' │ │ parentData: <none> (can use size)\n' ' │ │ parentData: <none> (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, h=100.0)\n' ' │ │ constraints: BoxConstraints(w=800.0, h=100.0)\n'
' │ │ size: Size(800.0, 100.0)\n' ' │ │ size: Size(800.0, 100.0)\n'
...@@ -361,24 +336,12 @@ void main() { ...@@ -361,24 +336,12 @@ void main() {
' │ │ maxHeight: 0.0\n' ' │ │ maxHeight: 0.0\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderConstrainedBox#00000\n' ' │ └─child: RenderConstrainedBox#00000\n'
' │ creator: ConstrainedBox ← LimitedBox ← ConstrainedBox ← Container\n'
' │ ← RepaintBoundary-[<0>] ← SliverList ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=100.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=100.0)\n'
' │ size: Size(800.0, 100.0)\n' ' │ size: Size(800.0, 100.0)\n'
' │ additionalConstraints: BoxConstraints(biggest)\n' ' │ additionalConstraints: BoxConstraints(biggest)\n'
' │\n' ' │\n'
' ├─child with index 1: RenderRepaintBoundary#00000 relayoutBoundary=up2\n' ' ├─child with index 1: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ │ creator: RepaintBoundary-[<1>] ← SliverList ← Viewport ←\n'
' │ │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ │ _GestureSemantics ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ │ NotificationListener<ScrollNotification> ← ⋯\n'
' │ │ parentData: index=1; layoutOffset=100.0 (can use size)\n' ' │ │ parentData: index=1; layoutOffset=100.0 (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ layer: OffsetLayer#00000\n' ' │ │ layer: OffsetLayer#00000\n'
...@@ -388,24 +351,12 @@ void main() { ...@@ -388,24 +351,12 @@ void main() {
' │ │ repaints)\n' ' │ │ repaints)\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n' ' │ └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n'
' │ │ creator: ConstrainedBox ← Container ← RepaintBoundary-[<1>] ←\n'
' │ │ SliverList ← Viewport ← _ScrollableScope ←\n'
' │ │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ │ ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← CustomPaint ← ⋯\n'
' │ │ parentData: <none> (can use size)\n' ' │ │ parentData: <none> (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ size: Size(800.0, 100.0)\n' ' │ │ size: Size(800.0, 100.0)\n'
' │ │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n' ' │ │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderLimitedBox#00000\n' ' │ └─child: RenderLimitedBox#00000\n'
' │ │ creator: LimitedBox ← ConstrainedBox ← Container ←\n'
' │ │ RepaintBoundary-[<1>] ← SliverList ← Viewport ←\n'
' │ │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ │ _GestureSemantics ←\n'
' │ │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ │ ← RepaintBoundary ← ⋯\n'
' │ │ parentData: <none> (can use size)\n' ' │ │ parentData: <none> (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, h=100.0)\n' ' │ │ constraints: BoxConstraints(w=800.0, h=100.0)\n'
' │ │ size: Size(800.0, 100.0)\n' ' │ │ size: Size(800.0, 100.0)\n'
...@@ -413,24 +364,12 @@ void main() { ...@@ -413,24 +364,12 @@ void main() {
' │ │ maxHeight: 0.0\n' ' │ │ maxHeight: 0.0\n'
' │ │\n' ' │ │\n'
' │ └─child: RenderConstrainedBox#00000\n' ' │ └─child: RenderConstrainedBox#00000\n'
' │ creator: ConstrainedBox ← LimitedBox ← ConstrainedBox ← Container\n'
' │ ← RepaintBoundary-[<1>] ← SliverList ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=100.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=100.0)\n'
' │ size: Size(800.0, 100.0)\n' ' │ size: Size(800.0, 100.0)\n'
' │ additionalConstraints: BoxConstraints(biggest)\n' ' │ additionalConstraints: BoxConstraints(biggest)\n'
' │\n' ' │\n'
' └─child with index 2: RenderRepaintBoundary#00000 relayoutBoundary=up2\n' ' └─child with index 2: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ creator: RepaintBoundary-[<2>] ← SliverList ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ← ⋯\n'
' │ parentData: index=2; layoutOffset=200.0 (can use size)\n' ' │ parentData: index=2; layoutOffset=200.0 (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -440,24 +379,12 @@ void main() { ...@@ -440,24 +379,12 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n' ' └─child: RenderConstrainedBox#00000 relayoutBoundary=up3\n'
' │ creator: ConstrainedBox ← Container ← RepaintBoundary-[<2>] ←\n'
' │ SliverList ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n' ' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ size: Size(800.0, 100.0)\n' ' │ size: Size(800.0, 100.0)\n'
' │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n' ' │ additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n'
' │\n' ' │\n'
' └─child: RenderLimitedBox#00000\n' ' └─child: RenderLimitedBox#00000\n'
' │ creator: LimitedBox ← ConstrainedBox ← Container ←\n'
' │ RepaintBoundary-[<2>] ← SliverList ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=100.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=100.0)\n'
' │ size: Size(800.0, 100.0)\n' ' │ size: Size(800.0, 100.0)\n'
...@@ -465,12 +392,6 @@ void main() { ...@@ -465,12 +392,6 @@ void main() {
' │ maxHeight: 0.0\n' ' │ maxHeight: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000\n' ' └─child: RenderConstrainedBox#00000\n'
' creator: ConstrainedBox ← LimitedBox ← ConstrainedBox ← Container\n'
' ← RepaintBoundary-[<2>] ← SliverList ← Viewport ←\n'
' _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' _GestureSemantics ←\n'
' RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ← ⋯\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=800.0, h=100.0)\n' ' constraints: BoxConstraints(w=800.0, h=100.0)\n'
' size: Size(800.0, 100.0)\n' ' size: Size(800.0, 100.0)\n'
......
...@@ -39,7 +39,7 @@ void main() { ...@@ -39,7 +39,7 @@ void main() {
maxHeight: 4.0 maxHeight: 4.0
).debugFillProperties(builder); ).debugFillProperties(builder);
final List<String> description = builder.properties final List<String> description = builder.properties
.where((DiagnosticsNode n) => !n.hidden) .where((DiagnosticsNode n) => !n.isFiltered(DiagnosticLevel.info))
.map((DiagnosticsNode n) => n.toString()).toList(); .map((DiagnosticsNode n) => n.toString()).toList();
expect(description, <String>[ expect(description, <String>[
'alignment: FractionalOffset.center', 'alignment: FractionalOffset.center',
......
...@@ -34,18 +34,14 @@ void main() { ...@@ -34,18 +34,14 @@ void main() {
expect(theater, hasAGoodToStringDeep); expect(theater, hasAGoodToStringDeep);
expect( expect(
theater.toStringDeep(), theater.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'_RenderTheatre#00000\n' '_RenderTheatre#f5cf2\n'
' │ creator: _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' │ [root]\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
' │\n' ' │\n'
' ├─onstage: RenderStack#00000\n' ' ├─onstage: RenderStack#39819\n'
' ╎ │ creator: Stack ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' ╎ │ Directionality ← [root]\n'
' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n' ' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n'
' ╎ │ size)\n' ' ╎ │ size)\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
...@@ -55,11 +51,7 @@ void main() { ...@@ -55,11 +51,7 @@ void main() {
' ╎ │ fit: expand\n' ' ╎ │ fit: expand\n'
' ╎ │ overflow: clip\n' ' ╎ │ overflow: clip\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child 1: RenderLimitedBox#00000\n' ' ╎ └─child 1: RenderLimitedBox#d1448\n'
' ╎ │ creator: LimitedBox ← Container ←\n'
' ╎ │ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ │ Stack ← _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' ╎ │ [root]\n'
' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n' ' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n'
' ╎ │ size)\n' ' ╎ │ size)\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
...@@ -67,11 +59,7 @@ void main() { ...@@ -67,11 +59,7 @@ void main() {
' ╎ │ maxWidth: 0.0\n' ' ╎ │ maxWidth: 0.0\n'
' ╎ │ maxHeight: 0.0\n' ' ╎ │ maxHeight: 0.0\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child: RenderConstrainedBox#00000\n' ' ╎ └─child: RenderConstrainedBox#e8b87\n'
' ╎ creator: ConstrainedBox ← LimitedBox ← Container ←\n'
' ╎ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ Stack ← _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' ╎ [root]\n'
' ╎ parentData: <none> (can use size)\n' ' ╎ parentData: <none> (can use size)\n'
' ╎ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' ╎ size: Size(800.0, 600.0)\n' ' ╎ size: Size(800.0, 600.0)\n'
...@@ -113,18 +101,14 @@ void main() { ...@@ -113,18 +101,14 @@ void main() {
expect(theater, hasAGoodToStringDeep); expect(theater, hasAGoodToStringDeep);
expect( expect(
theater.toStringDeep(), theater.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'_RenderTheatre#00000\n' '_RenderTheatre#b22a8\n'
' │ creator: _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' │ [root]\n'
' │ parentData: <none>\n' ' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
' │\n' ' │\n'
' ├─onstage: RenderStack#00000\n' ' ├─onstage: RenderStack#eab87\n'
' ╎ │ creator: Stack ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' ╎ │ Directionality ← [root]\n'
' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n' ' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n'
' ╎ │ size)\n' ' ╎ │ size)\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
...@@ -134,11 +118,7 @@ void main() { ...@@ -134,11 +118,7 @@ void main() {
' ╎ │ fit: expand\n' ' ╎ │ fit: expand\n'
' ╎ │ overflow: clip\n' ' ╎ │ overflow: clip\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child 1: RenderLimitedBox#00000\n' ' ╎ └─child 1: RenderLimitedBox#ca15b\n'
' ╎ │ creator: LimitedBox ← Container ←\n'
' ╎ │ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ │ Stack ← _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' ╎ │ [root]\n'
' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n' ' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0) (can use\n'
' ╎ │ size)\n' ' ╎ │ size)\n'
' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
...@@ -146,53 +126,33 @@ void main() { ...@@ -146,53 +126,33 @@ void main() {
' ╎ │ maxWidth: 0.0\n' ' ╎ │ maxWidth: 0.0\n'
' ╎ │ maxHeight: 0.0\n' ' ╎ │ maxHeight: 0.0\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child: RenderConstrainedBox#00000\n' ' ╎ └─child: RenderConstrainedBox#dffe5\n'
' ╎ creator: ConstrainedBox ← LimitedBox ← Container ←\n'
' ╎ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ Stack ← _Theatre ← Overlay-[GlobalKey#00000] ← Directionality ←\n'
' ╎ [root]\n'
' ╎ parentData: <none> (can use size)\n' ' ╎ parentData: <none> (can use size)\n'
' ╎ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' ╎ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' ╎ size: Size(800.0, 600.0)\n' ' ╎ size: Size(800.0, 600.0)\n'
' ╎ additionalConstraints: BoxConstraints(biggest)\n' ' ╎ additionalConstraints: BoxConstraints(biggest)\n'
' ╎\n' ' ╎\n'
' ╎╌offstage 1: RenderLimitedBox#00000 NEEDS-LAYOUT NEEDS-PAINT\n' ' ╎╌offstage 1: RenderLimitedBox#b6f09 NEEDS-LAYOUT NEEDS-PAINT\n'
' ╎ │ creator: LimitedBox ← Container ←\n'
' ╎ │ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ │ TickerMode ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' ╎ │ Directionality ← [root]\n'
' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0)\n' ' ╎ │ parentData: not positioned; offset=Offset(0.0, 0.0)\n'
' ╎ │ constraints: MISSING\n' ' ╎ │ constraints: MISSING\n'
' ╎ │ size: MISSING\n' ' ╎ │ size: MISSING\n'
' ╎ │ maxWidth: 0.0\n' ' ╎ │ maxWidth: 0.0\n'
' ╎ │ maxHeight: 0.0\n' ' ╎ │ maxHeight: 0.0\n'
' ╎ │\n' ' ╎ │\n'
' ╎ └─child: RenderConstrainedBox#00000 NEEDS-LAYOUT NEEDS-PAINT\n' ' ╎ └─child: RenderConstrainedBox#5a057 NEEDS-LAYOUT NEEDS-PAINT\n'
' ╎ creator: ConstrainedBox ← LimitedBox ← Container ←\n'
' ╎ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' ╎ TickerMode ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' ╎ Directionality ← [root]\n'
' ╎ parentData: <none>\n' ' ╎ parentData: <none>\n'
' ╎ constraints: MISSING\n' ' ╎ constraints: MISSING\n'
' ╎ size: MISSING\n' ' ╎ size: MISSING\n'
' ╎ additionalConstraints: BoxConstraints(biggest)\n' ' ╎ additionalConstraints: BoxConstraints(biggest)\n'
' ╎\n' ' ╎\n'
' └╌offstage 2: RenderLimitedBox#00000 NEEDS-LAYOUT NEEDS-PAINT\n' ' └╌offstage 2: RenderLimitedBox#f689e NEEDS-LAYOUT NEEDS-PAINT\n'
' │ creator: LimitedBox ← Container ←\n'
' │ _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' │ TickerMode ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' │ Directionality ← [root]\n'
' │ parentData: not positioned; offset=Offset(0.0, 0.0)\n' ' │ parentData: not positioned; offset=Offset(0.0, 0.0)\n'
' │ constraints: MISSING\n' ' │ constraints: MISSING\n'
' │ size: MISSING\n' ' │ size: MISSING\n'
' │ maxWidth: 0.0\n' ' │ maxWidth: 0.0\n'
' │ maxHeight: 0.0\n' ' │ maxHeight: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000 NEEDS-LAYOUT NEEDS-PAINT\n' ' └─child: RenderConstrainedBox#c15f0 NEEDS-LAYOUT NEEDS-PAINT\n'
' creator: ConstrainedBox ← LimitedBox ← Container ←\n'
' _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#00000] ←\n'
' TickerMode ← _Theatre ← Overlay-[GlobalKey#00000] ←\n'
' Directionality ← [root]\n'
' parentData: <none>\n' ' parentData: <none>\n'
' constraints: MISSING\n' ' constraints: MISSING\n'
' size: MISSING\n' ' size: MISSING\n'
......
...@@ -62,16 +62,9 @@ void main() { ...@@ -62,16 +62,9 @@ void main() {
final RenderObject viewport = tester.renderObject<RenderObject>(find.byType(SliverFillViewport).first); final RenderObject viewport = tester.renderObject<RenderObject>(find.byType(SliverFillViewport).first);
expect(viewport, hasAGoodToStringDeep); expect(viewport, hasAGoodToStringDeep);
expect( expect(
viewport.toStringDeep(), viewport.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'RenderSliverFillViewport#00000 relayoutBoundary=up1\n' 'RenderSliverFillViewport#00000 relayoutBoundary=up1\n'
' │ creator: SliverFillViewport ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ←\n'
' │ GlowingOverscrollIndicator ← ⋯\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n' ' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
...@@ -83,12 +76,6 @@ void main() { ...@@ -83,12 +76,6 @@ void main() {
' │ currently live children: 0 to 0\n' ' │ currently live children: 0 to 0\n'
' │\n' ' │\n'
' └─child with index 0: RenderRepaintBoundary#00000\n' ' └─child with index 0: RenderRepaintBoundary#00000\n'
' │ creator: RepaintBoundary-[<0>] ← SliverFillViewport ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ← ⋯\n'
' │ parentData: index=0; layoutOffset=0.0\n' ' │ parentData: index=0; layoutOffset=0.0\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n' ' │ layer: OffsetLayer#00000\n'
...@@ -98,12 +85,6 @@ void main() { ...@@ -98,12 +85,6 @@ void main() {
' │ repaints)\n' ' │ repaints)\n'
' │\n' ' │\n'
' └─child: RenderParagraph#00000\n' ' └─child: RenderParagraph#00000\n'
' │ creator: RichText ← Text ← Container ← RepaintBoundary-[<0>] ←\n'
' │ SliverFillViewport ← Viewport ← _ScrollableScope ←\n'
' │ IgnorePointer-[GlobalKey#00000] ← Listener ← _GestureSemantics\n'
' │ ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n' ' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n' ' │ size: Size(800.0, 600.0)\n'
......
...@@ -82,16 +82,9 @@ void main() { ...@@ -82,16 +82,9 @@ void main() {
delegateThatCanThrow.shouldThrow = true; delegateThatCanThrow.shouldThrow = true;
expect(renderObject, hasAGoodToStringDeep); expect(renderObject, hasAGoodToStringDeep);
expect( expect(
renderObject.toStringDeep(), renderObject.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'_RenderSliverPinnedPersistentHeaderForWidgets#00000 relayoutBoundary=up1\n' '_RenderSliverPinnedPersistentHeaderForWidgets#00000 relayoutBoundary=up1\n'
' │ creator: _SliverPinnedPersistentHeader ←\n'
' │ SliverPersistentHeader-[GlobalKey#00000] ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←\n'
' │ NotificationListener<ScrollNotification> ← ⋯\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n' ' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n' ' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
...@@ -104,13 +97,6 @@ void main() { ...@@ -104,13 +97,6 @@ void main() {
' │ child position: 0.0\n' ' │ child position: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n' ' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ creator: ConstrainedBox ← Container ←\n'
' │ _SliverPinnedPersistentHeader ←\n'
' │ SliverPersistentHeader-[GlobalKey#00000] ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← CustomPaint ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=200.0)\n' ' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=200.0)\n'
' │ size: Size(800.0, 200.0)\n' ' │ size: Size(800.0, 200.0)\n'
...@@ -118,13 +104,6 @@ void main() { ...@@ -118,13 +104,6 @@ void main() {
' │ 100.0<=h<=200.0)\n' ' │ 100.0<=h<=200.0)\n'
' │\n' ' │\n'
' └─child: RenderLimitedBox#00000 relayoutBoundary=up3\n' ' └─child: RenderLimitedBox#00000 relayoutBoundary=up3\n'
' │ creator: LimitedBox ← ConstrainedBox ← Container ←\n'
' │ _SliverPinnedPersistentHeader ←\n'
' │ SliverPersistentHeader-[GlobalKey#00000] ← Viewport ←\n'
' │ _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' │ _GestureSemantics ←\n'
' │ RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' │ ← RepaintBoundary ← ⋯\n'
' │ parentData: <none> (can use size)\n' ' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, 100.0<=h<=200.0)\n' ' │ constraints: BoxConstraints(w=800.0, 100.0<=h<=200.0)\n'
' │ size: Size(800.0, 200.0)\n' ' │ size: Size(800.0, 200.0)\n'
...@@ -132,13 +111,6 @@ void main() { ...@@ -132,13 +111,6 @@ void main() {
' │ maxHeight: 0.0\n' ' │ maxHeight: 0.0\n'
' │\n' ' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up4\n' ' └─child: RenderConstrainedBox#00000 relayoutBoundary=up4\n'
' creator: ConstrainedBox ← LimitedBox ← ConstrainedBox ← Container\n'
' ← _SliverPinnedPersistentHeader ←\n'
' SliverPersistentHeader-[GlobalKey#00000] ← Viewport ←\n'
' _ScrollableScope ← IgnorePointer-[GlobalKey#00000] ← Listener ←\n'
' _GestureSemantics ←\n'
' RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#00000]\n'
' ← ⋯\n'
' parentData: <none> (can use size)\n' ' parentData: <none> (can use size)\n'
' constraints: BoxConstraints(w=800.0, 100.0<=h<=200.0)\n' ' constraints: BoxConstraints(w=800.0, 100.0<=h<=200.0)\n'
' size: Size(800.0, 200.0)\n' ' size: Size(800.0, 200.0)\n'
......
...@@ -541,7 +541,7 @@ void main() { ...@@ -541,7 +541,7 @@ void main() {
final RenderObjectElement element = key0.currentContext; final RenderObjectElement element = key0.currentContext;
expect(element, hasAGoodToStringDeep); expect(element, hasAGoodToStringDeep);
expect( expect(
element.toStringDeep(), element.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes( equalsIgnoringHashCodes(
'Table-[GlobalKey#00000](renderObject: RenderTable#00000)\n' 'Table-[GlobalKey#00000](renderObject: RenderTable#00000)\n'
'├Text("A")\n' '├Text("A")\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment