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

Side by Side Diff: sky/examples/stocks2/lib/stock_app.dart

Issue 1178703002: Abstract out the AppView logic in fn so that it can also be used in non-pure-fn apps. (Closed) Base URL: https://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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/app.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:sky/framework/components2/tool_bar.dart'; 5 import 'package:sky/framework/components2/tool_bar.dart';
6 import 'package:sky/framework/components2/drawer.dart'; 6 import 'package:sky/framework/components2/drawer.dart';
7 import 'package:sky/framework/components2/drawer_header.dart'; 7 import 'package:sky/framework/components2/drawer_header.dart';
8 import 'package:sky/framework/components2/floating_action_button.dart'; 8 import 'package:sky/framework/components2/floating_action_button.dart';
9 import 'package:sky/framework/components2/icon.dart'; 9 import 'package:sky/framework/components2/icon.dart';
10 import 'package:sky/framework/components2/icon_button.dart'; 10 import 'package:sky/framework/components2/icon_button.dart';
(...skipping 28 matching lines...) Expand all
39 // if (debug) 39 // if (debug)
40 // new Timer(new Duration(seconds: 1), dumpState); 40 // new Timer(new Duration(seconds: 1), dumpState);
41 new StockDataFetcher((StockData data) { 41 new StockDataFetcher((StockData data) {
42 setState(() { 42 setState(() {
43 data.appendTo(_stocks); 43 data.appendTo(_stocks);
44 }); 44 });
45 }); 45 });
46 _drawerController = new DrawerController(_handleDrawerStatusChanged); 46 _drawerController = new DrawerController(_handleDrawerStatusChanged);
47 } 47 }
48 48
49 void syncFields(StocksApp source) { }
50
51 bool _isSearching = false; 49 bool _isSearching = false;
52 String _searchQuery; 50 String _searchQuery;
53 51
54 void _handleSearchBegin(_) { 52 void _handleSearchBegin(_) {
55 setState(() { 53 setState(() {
56 _isSearching = true; 54 _isSearching = true;
57 }); 55 });
58 } 56 }
59 57
60 void _handleSearchEnd(_) { 58 void _handleSearchEnd(_) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 215 }
218 216
219 void main() { 217 void main() {
220 print("starting stocks app!"); 218 print("starting stocks app!");
221 App app = new StocksApp(); 219 App app = new StocksApp();
222 app.appView.onFrame = () { 220 app.appView.onFrame = () {
223 // uncomment this for debugging: 221 // uncomment this for debugging:
224 // app.appView.debugDumpRenderTree(); 222 // app.appView.debugDumpRenderTree();
225 }; 223 };
226 } 224 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698