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; |
+ } |
+} |