From 32cd916e0007295cfcb6715d674382033e847e65 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 18 Jan 2016 21:14:51 -0800 Subject: [PATCH] StackParentData.toString() fix, RenderOpacity default --- packages/flutter/lib/src/rendering/proxy_box.dart | 2 +- packages/flutter/lib/src/rendering/stack.dart | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 313e2627fc..9ea53993e4 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -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); } diff --git a/packages/flutter/lib/src/rendering/stack.dart b/packages/flutter/lib/src/rendering/stack.dart index be1204eb60..aef8ab7a4f 100644 --- a/packages/flutter/lib/src/rendering/stack.dart +++ b/packages/flutter/lib/src/rendering/stack.dart @@ -202,8 +202,9 @@ class StackParentData extends ContainerBoxParentDataMixin { 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('; '); } }