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

Unified Diff: sky/framework/components/action_bar.dart

Issue 1007893005: Clean up stock_app.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/components/drawer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/action_bar.dart
diff --git a/sky/framework/components/action_bar.dart b/sky/framework/components/action_bar.dart
index 8e97cf510c483c908c9913379687b345b06d2ae9..7b8cdbc0ac345bd28abd826d19dc7483d5b6f8ce 100644
--- a/sky/framework/components/action_bar.dart
+++ b/sky/framework/components/action_bar.dart
@@ -3,29 +3,39 @@
// found in the LICENSE file.
import '../fn.dart';
-import '../theme/colors.dart';
import '../theme/shadows.dart';
import '../theme/view-configuration.dart';
class ActionBar extends Component {
- List<Node> children;
-
static final Style _style = new Style('''
display: flex;
align-items: center;
height: 56px;
padding: 0 8px;
- background-color: ${Purple[500]};
padding-top: ${kStatusBarHeight}px;
- box-shadow: ${Shadow[2]};'''
- );
+ box-shadow: ${Shadow[2]};''');
+
+ static Style _centerStyle = new Style('''
+ padding-left: 24px;
+ flex: 1;''');
+
+ Node left;
+ Node center;
+ List<Node> right;
- ActionBar({String key, this.children}) : super(key: key);
+ ActionBar({
+ String key,
+ this.left,
+ this.center,
+ this.right
+ }) : super(key: key);
Node build() {
- return new Container(
- style: _style,
- children: children
- );
+ List<Node> children = [left, new StyleNode(center, _centerStyle)];
+
+ if (right != null)
+ children.addAll(right);
+
+ return new Container(style: _style, children: children);
}
}
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/components/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698