add debugFillDescription to OverflowBox
diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart
index 070dbd7..f35fdf2 100644
--- a/packages/flutter/lib/src/widgets/basic.dart
+++ b/packages/flutter/lib/src/widgets/basic.dart
@@ -655,6 +655,18 @@
..maxHeight = maxHeight
..alignment = alignment;
}
+
+ void debugFillDescription(List<String> description) {
+ super.debugFillDescription(description);
+ if (minWidth != null)
+ description.add('minWidth: $minWidth');
+ if (maxWidth != null)
+ description.add('maxWidth: $maxWidth');
+ if (minHeight != null)
+ description.add('minHeight: $minHeight');
+ if (maxHeight != null)
+ description.add('maxHeight: $maxHeight');
+ }
}
class SizedOverflowBox extends OneChildRenderObjectWidget {
diff --git a/packages/flutter/test/widget/overflow_box_test.dart b/packages/flutter/test/widget/overflow_box_test.dart
index 7d1cc4f..0fb35cf 100644
--- a/packages/flutter/test/widget/overflow_box_test.dart
+++ b/packages/flutter/test/widget/overflow_box_test.dart
@@ -32,4 +32,20 @@
expect(box.size, equals(const Size(100.0, 50.0)));
});
});
+
+ test('OverflowBox implements debugFillDescription', () {
+ List<String> description = <String>[];
+ new OverflowBox(
+ minWidth: 1.0,
+ maxWidth: 2.0,
+ minHeight: 3.0,
+ maxHeight: 4.0
+ ).debugFillDescription(description);
+ expect(description, [
+ 'minWidth: 1.0',
+ 'maxWidth: 2.0',
+ 'minHeight: 3.0',
+ 'maxHeight: 4.0',
+ ]);
+ });
}