Index: sky/examples/stocks/lib/stock_list.dart |
diff --git a/sky/examples/stocks/lib/stock_list.dart b/sky/examples/stocks/lib/stock_list.dart |
index 2e6e5bbf1d9db5e92f85d7b4edcb8dd200bc0f48..78a8d64c6b490c0c5962da26a99e2340dc0e9d67 100644 |
--- a/sky/examples/stocks/lib/stock_list.dart |
+++ b/sky/examples/stocks/lib/stock_list.dart |
@@ -16,12 +16,15 @@ class Stocklist extends FixedHeightScrollable { |
Object key, |
this.stocks, |
this.query |
- }) : super(key: key, scrollBehavior: new OverscrollBehavior()); |
+ }) : super(key: key); |
List<UINode> buildItems(int start, int count) { |
- return stocks |
- .where((stock) => query == null || stock.symbol.contains( |
- new RegExp(query, caseSensitive: false))) |
+ var filteredStocks = stocks.where((stock) { |
+ return query == null || |
+ stock.symbol.contains(new RegExp(query, caseSensitive: false)); |
+ }); |
+ itemCount = filteredStocks.length; |
abarth-chromium
2015/06/04 16:23:17
Won't this |length| query force the filter to be e
|
+ return filteredStocks |
.skip(start) |
.take(count) |
.map((stock) => new StockRow(stock: stock)) |