Index: sky/sdk/example/stocks/lib/stock_list.dart |
diff --git a/sky/sdk/example/stocks/lib/stock_list.dart b/sky/sdk/example/stocks/lib/stock_list.dart |
index c0fbe44ee07857c50a187cb050cd1365a07fc175..4b36783d186d25f5a0cd5920b5794a8a234cc844 100644 |
--- a/sky/sdk/example/stocks/lib/stock_list.dart |
+++ b/sky/sdk/example/stocks/lib/stock_list.dart |
@@ -2,22 +2,30 @@ |
// 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 'package:sky/widgets/fixed_height_scrollable.dart'; |
+import 'package:sky/widgets/basic.dart'; |
+ |
import 'stock_data.dart'; |
import 'stock_row.dart'; |
class Stocklist extends FixedHeightScrollable { |
- String query; |
- List<Stock> stocks; |
Stocklist({ |
- Object key, |
+ String key, |
this.stocks, |
this.query |
- }) : super(key: key); |
+ }) : super(itemHeight: StockRow.kHeight, key: key); |
+ |
+ String query; |
+ List<Stock> stocks; |
+ |
+ void syncFields(Stocklist source) { |
+ query = source.query; |
+ stocks = source.stocks; |
+ super.syncFields(source); |
+ } |
- List<UINode> buildItems(int start, int count) { |
+ List<Widget> buildItems(int start, int count) { |
var filteredStocks = stocks.where((stock) { |
return query == null || |
stock.symbol.contains(new RegExp(query, caseSensitive: false)); |