forked from firka/flutter
Switch clients to ScrollGrid (#7752)
The only remaining client of ScrollableGrid (the old version) is Pesto, which needs AppBar integration.
This commit is contained in:
@@ -76,14 +76,14 @@ class AdaptiveContainer extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (MediaQuery.of(context).size.width < _kGridViewBreakpoint) {
|
||||
return new ScrollableList(
|
||||
return new ScrollView(
|
||||
itemExtent: _kListItemExtent,
|
||||
children: names.map((String name) => new AdaptedListItem(name: name))
|
||||
children: names.map((String name) => new AdaptedListItem(name: name)).toList(),
|
||||
);
|
||||
} else {
|
||||
return new ScrollableGrid(
|
||||
delegate: new MaxTileWidthGridDelegate(maxTileWidth: _kMaxTileWidth),
|
||||
children: names.map((String name) => new AdaptedGridItem(name: name))
|
||||
return new ScrollGrid.extent(
|
||||
maxCrossAxisExtent: _kMaxTileWidth,
|
||||
children: names.map((String name) => new AdaptedGridItem(name: name)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user