Add support for scrollable grids
We now support (vertically) scrollable grids with viewporting. If the scroll doesn't reveal any new rows, we execute the scroll with a repaint (i.e., no layout). If the scroll reveals a new row, we trigger a layout to change the set of materialized children in the viewport.
This commit is contained in:
@@ -76,13 +76,9 @@ class MediaQueryExample extends StatelessComponent {
|
||||
items.map((AdaptiveItem item) => item.toListItem()).toList()
|
||||
);
|
||||
} else {
|
||||
return new Block(
|
||||
<Widget>[
|
||||
new MaxTileWidthGrid(
|
||||
items.map((AdaptiveItem item) => item.toCard()).toList(),
|
||||
maxTileWidth: _maxTileWidth
|
||||
)
|
||||
]
|
||||
return new ScrollableGrid(
|
||||
children: items.map((AdaptiveItem item) => item.toCard()).toList(),
|
||||
delegate: new MaxTileWidthGridDelegate(maxTileWidth: _maxTileWidth)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user