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

Unified Diff: sky/examples/stocks-fn/stocklist.dart

Issue 971183002: Initial commit of Effen reactive framework experiment for Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/stockarrow.dart ('k') | sky/examples/stocks-fn/stockrow.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks-fn/stocklist.dart
diff --git a/sky/examples/stocks-fn/stocklist.dart b/sky/examples/stocks-fn/stocklist.dart
new file mode 100644
index 0000000000000000000000000000000000000000..187eb68207410fef4552079febf403fadd2bb251
--- /dev/null
+++ b/sky/examples/stocks-fn/stocklist.dart
@@ -0,0 +1,20 @@
+part of stocksapp;
+
+class Stocklist extends FixedHeightScrollable {
+
+ List<Stock> stocks;
+
+ Stocklist({
+ Object key,
+ this.stocks
+ }) : super(key: key, itemHeight: 80.0, height: 800.0, minOffset: 0.0);
+
+ List<Node> renderItems(int start, int count) {
+ var items = [];
+ for (var i = 0; i < count; i++) {
+ items.add(new StockRow(stock: stocks[start + i]));
+ }
+
+ return items;
+ }
+}
« no previous file with comments | « sky/examples/stocks-fn/stockarrow.dart ('k') | sky/examples/stocks-fn/stockrow.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698