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

Side by Side Diff: sky/examples/stocks/stocks.sky

Issue 1011023003: Make stocks-fn match the style for the Sky SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more 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 unified diff | Download patch
« no previous file with comments | « sky/examples/stocks-fn/stocksapp.dart ('k') | sky/sdk/packages/sky/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="/sky/framework/elements/sky-drawer-header.sky" /> 6 <import src="/sky/framework/elements/sky-drawer-header.sky" />
7 <import src="/sky/framework/elements/sky-drawer.sky" /> 7 <import src="/sky/framework/elements/sky-drawer.sky" />
8 <import src="/sky/framework/elements/sky-element.sky" /> 8 <import src="/sky/framework/elements/sky-element.sky" />
9 <import src="/sky/framework/elements/sky-icon.sky" /> 9 <import src="/sky/framework/elements/sky-icon.sky" />
10 <import src="/sky/framework/elements/sky-menu-divider.sky" /> 10 <import src="/sky/framework/elements/sky-menu-divider.sky" />
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 <div id="title">I am a stocks app</div> 63 <div id="title">I am a stocks app</div>
64 <sky-icon type="action/search_white" size="24" /> 64 <sky-icon type="action/search_white" size="24" />
65 <sky-icon type="navigation/more_vert_white" size="24" /> 65 <sky-icon type="navigation/more_vert_white" size="24" />
66 </sky-toolbar> 66 </sky-toolbar>
67 <sky-scrollable id='stock_list'> 67 <sky-scrollable id='stock_list'>
68 </sky-scrollable> 68 </sky-scrollable>
69 </template> 69 </template>
70 <script> 70 <script>
71 import "dart:sky"; 71 import "dart:sky";
72 import "dart:math"; 72 import "dart:math";
73 import "../data/stocks.dart" as model; 73 import "../stocks-fn/lib/stock_data.dart" as model;
74 74
75 List pick(List list, int count) { 75 List pick(List list, int count) {
76 var rng = new Random(); 76 var rng = new Random();
77 List picked = new List(); 77 List picked = new List();
78 for (int i = 0; i < count; i++) { 78 for (int i = 0; i < count; i++) {
79 picked.add(list[rng.nextInt(list.length)]); 79 picked.add(list[rng.nextInt(list.length)]);
80 } 80 }
81 return picked; 81 return picked;
82 } 82 }
83 83
(...skipping 19 matching lines...) Expand all
103 } 103 }
104 104
105 void _handleMenuClick(_) { 105 void _handleMenuClick(_) {
106 _drawer.toggle(); 106 _drawer.toggle();
107 } 107 }
108 } 108 }
109 109
110 _init(script) => register(script, Stocks); 110 _init(script) => register(script, Stocks);
111 </script> 111 </script>
112 </sky-element> 112 </sky-element>
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/stocksapp.dart ('k') | sky/sdk/packages/sky/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698