Commit 4c823cdb authored by yjbanov's avatar yjbanov

add debugFillDescription to OverflowBox

parent 3abb8c4e
......@@ -655,6 +655,18 @@ class OverflowBox extends OneChildRenderObjectWidget {
..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 {
......
......@@ -32,4 +32,20 @@ void main() {
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',
]);
});
}
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