Index: sky/examples/stocks2/lib/stock_list.dart |
diff --git a/sky/examples/stocks2/lib/stock_list.dart b/sky/examples/stocks2/lib/stock_list.dart |
index 58fa601ba9decca16f4fbf7f092a487241381fcc..7ff6fe8cb75f4d4809cee722c800992885b3fa7f 100644 |
--- a/sky/examples/stocks2/lib/stock_list.dart |
+++ b/sky/examples/stocks2/lib/stock_list.dart |
@@ -8,8 +8,6 @@ import 'stock_data.dart'; |
import 'stock_row.dart'; |
class Stocklist extends FixedHeightScrollable { |
- String query; |
- List<Stock> stocks; |
Stocklist({ |
Object key, |
@@ -17,6 +15,15 @@ class Stocklist extends FixedHeightScrollable { |
this.query |
}) : 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) { |
var filteredStocks = stocks.where((stock) { |
return query == null || |