StackParentData.toString() fix, RenderOpacity default
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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('; ');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user