| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| import 'package:sky/framework/components/fixed_height_scrollable.dart'; |
| import 'package:sky/framework/fn.dart'; |
| import 'stock_data.dart'; |
| class Stocklist extends FixedHeightScrollable { |
| List<UINode> buildItems(int start, int count) { |
| var filteredStocks = stocks.where((stock) { |
| stock.symbol.contains(new RegExp(query, caseSensitive: false)); |
| itemCount = filteredStocks.length; |
| .map((stock) => new StockRow(stock: stock)) |
| .toList(growable: false); |