Replace ScrollableList with ScrollableList2

ScrollableList2 is complete and subsumes all the use cases for the original
ScrollableList.
This commit is contained in:
Adam Barth
2016-01-06 10:35:23 -08:00
parent fa15fc2d04
commit 627c1ffb5c
14 changed files with 16 additions and 69 deletions

View File

@@ -393,7 +393,7 @@ class CardCollectionState extends State<CardCollection> {
Widget build(BuildContext context) {
Widget cardCollection;
if (_fixedSizeCards) {
cardCollection = new ScrollableList2 (
cardCollection = new ScrollableList (
snapOffsetCallback: _snapToCenter ? _toSnapOffset : null,
snapAlignmentOffset: _cardCollectionSize.height / 2.0,
itemExtent: _cardModels[0].height,

View File

@@ -72,7 +72,7 @@ class MediaQueryExample extends StatelessComponent {
items.add(new AdaptiveItem("Item $i"));
if (MediaQuery.of(context).size.width < _gridViewBreakpoint) {
return new ScrollableList2(
return new ScrollableList(
itemExtent: 50.0,
children: items.map((AdaptiveItem item) => item.toListItem())
);

View File

@@ -30,7 +30,7 @@ class ScrollbarAppState extends State<ScrollbarApp> {
final ScrollbarPainter _scrollbarPainter = new ScrollbarPainter();
Widget _buildMenu(BuildContext context) {
return new ScrollableList2(
return new ScrollableList(
itemExtent: _itemExtent,
scrollableListPainter: _scrollbarPainter,
children: new List<Widget>.generate(_itemCount, (int i) => new _Item(i))