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

Unified Diff: sky/examples/stocks2/lib/stock_app.dart

Issue 1157033006: DO NOT COMMIT - fn port to RenderNode, work in progress, does not work (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix adam's review comments Created 5 years, 7 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 | « no previous file | sky/examples/stocks2/lib/stock_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks2/lib/stock_app.dart
diff --git a/sky/examples/stocks2/lib/stock_app.dart b/sky/examples/stocks2/lib/stock_app.dart
index 3855af940f5be99d02577ef64d5334e3b45feff9..00e4004598b3a7391cf1ec714cdb817923b8bf40 100644
--- a/sky/examples/stocks2/lib/stock_app.dart
+++ b/sky/examples/stocks2/lib/stock_app.dart
@@ -14,7 +14,7 @@
// import 'package:sky/framework/components2/modal_overlay.dart';
// import 'package:sky/framework/components2/popup_menu.dart';
// import 'package:sky/framework/components2/radio.dart';
-// import 'package:sky/framework/components2/scaffold.dart';
+import 'package:sky/framework/components2/scaffold.dart';
import 'package:sky/framework/fn2.dart';
import 'package:sky/framework/theme/typography.dart' as typography;
import 'package:sky/framework/theme/colors.dart';
@@ -161,39 +161,40 @@ class StocksApp extends App {
// );
// }
- // UINode buildToolBar() {
- // return new StyleNode(
- // new ToolBar(
- // left: new IconButton(
- // icon: 'navigation/menu_white',
- // onGestureTap: _drawerController.toggle),
- // center: new Container(
- // style: _titleStyle,
- // children: [new Text('Stocks')]),
- // right: [
- // new IconButton(
- // icon: 'action/search_white',
- // onGestureTap: _handleSearchBegin),
- // new IconButton(
- // icon: 'navigation/more_vert_white',
- // onGestureTap: _handleMenuShow)
- // ]),
- // _toolBarStyle);
- // }
+ UINode buildToolBar() {
+ return new Rectangle(0xFF00FF00);
+ // return new StyleNode(
+ // new ToolBar(
+ // left: new IconButton(
+ // icon: 'navigation/menu_white',
+ // onGestureTap: _drawerController.toggle),
+ // center: new Container(
+ // style: _titleStyle,
+ // children: [new Text('Stocks')]),
+ // right: [
+ // new IconButton(
+ // icon: 'action/search_white',
+ // onGestureTap: _handleSearchBegin),
+ // new IconButton(
+ // icon: 'navigation/more_vert_white',
+ // onGestureTap: _handleMenuShow)
+ // ]),
+ // _toolBarStyle);
+ }
- // // TODO(abarth): Should we factor this into a SearchBar in the framework?
- // UINode buildSearchBar() {
- // return new StyleNode(
- // new ToolBar(
- // left: new IconButton(
- // icon: 'navigation/arrow_back_grey600',
- // onGestureTap: _handleSearchEnd),
- // center: new Input(
- // focused: true,
- // placeholder: 'Search stocks',
- // onChanged: _handleSearchQueryChanged)),
- // _searchBarStyle);
- // }
+ // TODO(abarth): Should we factor this into a SearchBar in the framework?
+ UINode buildSearchBar() {
+ // return new StyleNode(
+ // new ToolBar(
+ // left: new IconButton(
+ // icon: 'navigation/arrow_back_grey600',
+ // onGestureTap: _handleSearchEnd),
+ // center: new Input(
+ // focused: true,
+ // placeholder: 'Search stocks',
+ // onChanged: _handleSearchQueryChanged)),
+ // _searchBarStyle);
+ }
// void addMenuToOverlays(List<UINode> overlays) {
// if (_menuController == null)
@@ -211,17 +212,19 @@ class StocksApp extends App {
// List<UINode> overlays = [];
// addMenuToOverlays(overlays);
- // return new Scaffold(
- // header: _isSearching ? buildSearchBar() : buildToolBar(),
- // content: new Stocklist(stocks: _stocks, query: _searchQuery),
- // fab: new FloatingActionButton(
+ return new Scaffold(
+ toolbar: _isSearching ? buildSearchBar() : buildToolBar()
+ // ,
+ // body: new Stocklist(stocks: _stocks, query: _searchQuery),
+ // floatingActionButton: new FloatingActionButton(
// content: new Icon(type: 'content/add_white', size: 24), level: 3),
// drawer: _drawerShowing ? buildDrawer() : null,
// overlays: overlays
- // );
+ );
}
}
void main() {
+ print("starting stocks app!");
new StocksApp();
}
« no previous file with comments | « no previous file | sky/examples/stocks2/lib/stock_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698