Index: sky/sdk/lib/framework/widgets/tool_bar.dart |
diff --git a/sky/sdk/lib/framework/widgets/tool_bar.dart b/sky/sdk/lib/framework/widgets/tool_bar.dart |
index 2af880b8d9c6de793cac8d16d2d50d4da0e93399..d90df06c49d0dce593b1d9dcb2a5cb244522a179 100644 |
--- a/sky/sdk/lib/framework/widgets/tool_bar.dart |
+++ b/sky/sdk/lib/framework/widgets/tool_bar.dart |
@@ -23,14 +23,14 @@ class ToolBar extends Component { |
final Color backgroundColor; |
UINode build() { |
- List<UINode> children = [ |
- left, |
- new FlexExpandingChild( |
- new Padding( |
- child: center, |
- padding: new EdgeDims.only(left: 24.0) |
- )) |
- ]; |
+ List<UINode> children = new List<UINode>(); |
+ if (left != null) |
+ children.add(left); |
+ |
+ if (center != null) { |
+ children.add(new FlexExpandingChild( |
+ new Padding(child: center, padding: new EdgeDims.only(left: 24.0)))); |
+ } |
if (right != null) |
children.addAll(right); |