You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am exploring this package as a potential alternative to flutter_staggered_grid_view, which no longer supports scrollable staggered grid views (it supports staggered grids, but these are not buildable or scrollable).
This package allows full control over placing items in rows and columns, which is invaluable for creative layouts. However, I couldn't find any option for using a Builder, which is a critical feature for my use case.
Ideally, a LayoutGrid builder should operate like other builders in Flutter. Instead of receiving a list of children, it would rather have a Widget Function(BuildContext context, int index) parameter to dynamically build its children. Using this approach, the Grid could build children only when they are in the viewport. This also means, the Grid would be scrollable and transform it into a LayoutGridView, based on Flutter's naming convention, where Views are scrollable. This functionality is crucial for larger grids with many children, as building all children at all times can lead to significant performance issues.
The usual practice in Flutter for lists and grids is to first create a Sliver version (a builder without a ScrollView), then provide a version wrapped in a BoxScrollView. For example, a ListView is a SliverList wrapped in a BoxScrollView.
The API might look similar to this:
a SliverLayoutGrid widget, which is a Sliver that uses a SliverChildBuilderDelegate to build its children.
a LayoutGridView widget which is a BoxScrollView that internally uses a SliverLayoutGrid. It could come with both a children list parameter and a .builder constructor. This would not replace the usual LayoutGrid, which is not scrollable.
Incorporating this functionality may entail a significant refactor, and I'm unsure about its feasibility with the current layout algorithm (since flutter_staggered_grid_view removed StaggeredGridView due to performance issues with its layout algorithm). It also deviates somewhat from a pure CSS grid. However, this enhancement would make the package incredibly versatile.
The key use case for this feature is to create infinite, paginated, quilted/staggered image layouts. Pagination can be added externally as long as a Sliver version with a builder is available. I typically use infinite_scroll_pagination to enable this functionality with any Sliver.
The text was updated successfully, but these errors were encountered:
I am searchig the same functionality, like the CSS grid or flex system, where the row elements expands to the height of the tallest row element, would be very useful if this package had some similar functionality.
Uh oh!
There was an error while loading. Please reload this page.
I am exploring this package as a potential alternative to
flutter_staggered_grid_view
, which no longer supports scrollable staggered grid views (it supports staggered grids, but these are not buildable or scrollable).This package allows full control over placing items in rows and columns, which is invaluable for creative layouts. However, I couldn't find any option for using a Builder, which is a critical feature for my use case.
Ideally, a
LayoutGrid
builder should operate like other builders in Flutter. Instead of receiving a list of children, it would rather have aWidget Function(BuildContext context, int index)
parameter to dynamically build its children. Using this approach, the Grid could build children only when they are in the viewport. This also means, the Grid would be scrollable and transform it into aLayoutGridView
, based on Flutter's naming convention, where Views are scrollable. This functionality is crucial for larger grids with many children, as building all children at all times can lead to significant performance issues.The usual practice in Flutter for lists and grids is to first create a Sliver version (a builder without a
ScrollView
), then provide a version wrapped in aBoxScrollView
. For example, aListView
is aSliverList
wrapped in aBoxScrollView
.The API might look similar to this:
SliverLayoutGrid
widget, which is a Sliver that uses aSliverChildBuilderDelegate
to build its children.LayoutGridView
widget which is aBoxScrollView
that internally uses aSliverLayoutGrid
. It could come with both a children list parameter and a.builder
constructor. This would not replace the usualLayoutGrid
, which is not scrollable.Incorporating this functionality may entail a significant refactor, and I'm unsure about its feasibility with the current layout algorithm (since
flutter_staggered_grid_view
removedStaggeredGridView
due to performance issues with its layout algorithm). It also deviates somewhat from a pure CSS grid. However, this enhancement would make the package incredibly versatile.The key use case for this feature is to create infinite, paginated, quilted/staggered image layouts. Pagination can be added externally as long as a Sliver version with a builder is available. I typically use
infinite_scroll_pagination
to enable this functionality with any Sliver.The text was updated successfully, but these errors were encountered: