Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: sky/sdk/lib/framework/widgets/tool_bar.dart

Issue 1178293004: Port sky_home to the new SkyView world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/home.dart ('k') | sky/sdk/lib/framework/widgets/wrappers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « sky/home.dart ('k') | sky/sdk/lib/framework/widgets/wrappers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698