Replace ScrollableList with ScrollableList2
ScrollableList2 is complete and subsumes all the use cases for the original ScrollableList.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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())
|
||||
);
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user