StackParentData.toString() fix, RenderOpacity default

This commit is contained in:
Ian Hickson
2016-01-18 21:14:51 -08:00
parent 1770004eb4
commit 32cd916e00
2 changed files with 4 additions and 3 deletions

View File

@@ -535,7 +535,7 @@ int _getAlphaFromOpacity(double opacity) => (opacity * 255).round();
/// This class is relatively expensive because it requires painting the child
/// into an intermediate buffer.
class RenderOpacity extends RenderProxyBox {
RenderOpacity({ RenderBox child, double opacity })
RenderOpacity({ RenderBox child, double opacity: 1.0 })
: _opacity = opacity, _alpha = _getAlphaFromOpacity(opacity), super(child) {
assert(opacity >= 0.0 && opacity <= 1.0);
}

View File

@@ -202,8 +202,9 @@ class StackParentData extends ContainerBoxParentDataMixin<RenderBox> {
values.add('width=$width');
if (height != null)
values.add('height=$height');
if (values.length == null)
return 'all null';
if (values.isEmpty)
values.add('not positioned');
values.add(super.toString());
return values.join('; ');
}
}