stock_list.dart 564 Bytes
Newer Older
1 2 3 4
// 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.

5
part of stocks;
6 7

class Stocklist extends Component {
8
  Stocklist({ Key key, this.stocks }) : super(key: key);
9 10 11 12 13 14 15 16

  final List<Stock> stocks;

  Widget build() {
    return new Material(
      type: MaterialType.canvas,
      child: new ScrollableList<Stock>(
        items: stocks,
17
        itemExtent: StockRow.kHeight,
18 19 20 21 22
        itemBuilder: (stock) => new StockRow(stock: stock)
      )
    );
  }
}