mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Each layer is supposed to reexport the parts of the previous layer that are part of its API. - In painting.dart, export from dart:ui all the Canvas-related APIs that make sense to be used at higher levels, e.g. PaintingStyle. - Delete painting/shadows.dart. It was dead code. - In rendering/object.dart, export all of painting.dart. - In widgets/basic.dart, export all of painting.dart and animation.dart. Some classes in animation/ are renamed to make this less disruptive and confusing to the namespace. - Split out Stocks back into an import model rather than a part model, so that it's easier to manage its dependencies on a per-file basis. - Move Ticker to scheduler library. - Remove as many redundant imports as possible now. - Some minor nit picking cleanup in various files.
34 lines
946 B
Dart
34 lines
946 B
Dart
// 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:flutter/material.dart';
|
|
|
|
import 'stock_data.dart';
|
|
import 'stock_row.dart';
|
|
|
|
class StockList extends StatelessComponent {
|
|
StockList({ Key key, this.keySalt, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key);
|
|
|
|
final Object keySalt;
|
|
final List<Stock> stocks;
|
|
final StockRowActionCallback onOpen;
|
|
final StockRowActionCallback onShow;
|
|
final StockRowActionCallback onAction;
|
|
|
|
Widget build(BuildContext context) {
|
|
return new ScrollableList(
|
|
itemExtent: StockRow.kHeight,
|
|
children: stocks.map((Stock stock) {
|
|
return new StockRow(
|
|
keySalt: keySalt,
|
|
stock: stock,
|
|
onPressed: onOpen,
|
|
onDoubleTap: onShow,
|
|
onLongPressed: onAction
|
|
);
|
|
})
|
|
);
|
|
}
|
|
}
|