PagedSliverMasonryGrid<PageKeyType, ItemType> class

A SliverMasonryGrid with pagination capabilities.

You can also see this as a PagedSliverGrid that supports rows of varying sizes.

This is a wrapper around the SliverMasonryGrid from the flutter_staggered_grid_view package. For more info on how to build staggered grids, check out the referred package's documentation and examples.

Inheritance

Constructors

PagedSliverMasonryGrid({required PagingState<PageKeyType, ItemType> state, required NextPageCallback fetchNextPage, required PagedChildBuilderDelegate<ItemType> builderDelegate, required SliverSimpleGridDelegateBuilder gridDelegateBuilder, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, bool showNewPageProgressIndicatorAsGridChild = true, bool showNewPageErrorIndicatorAsGridChild = true, bool showNoMoreItemsIndicatorAsGridChild = true, bool shrinkWrapFirstPageIndicators = false, Key? key})
const
PagedSliverMasonryGrid.count({required PagingState<PageKeyType, ItemType> state, required NextPageCallback fetchNextPage, required PagedChildBuilderDelegate<ItemType> builderDelegate, required int crossAxisCount, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, bool showNewPageProgressIndicatorAsGridChild = true, bool showNewPageErrorIndicatorAsGridChild = true, bool showNoMoreItemsIndicatorAsGridChild = true, bool shrinkWrapFirstPageIndicators = false, Key? key})
Equivalent to SliverMasonryGrid.count.
PagedSliverMasonryGrid.extent({required PagingState<PageKeyType, ItemType> state, required NextPageCallback fetchNextPage, required PagedChildBuilderDelegate<ItemType> builderDelegate, required double maxCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, bool showNewPageProgressIndicatorAsGridChild = true, bool showNewPageErrorIndicatorAsGridChild = true, bool showNoMoreItemsIndicatorAsGridChild = true, bool shrinkWrapFirstPageIndicators = false, Key? key})
Equivalent to SliverMasonryGrid.extent.

Properties

addAutomaticKeepAlives → bool
Matches SliverChildBuilderDelegate.addAutomaticKeepAlives.
final
addRepaintBoundaries → bool
Matches SliverChildBuilderDelegate.addRepaintBoundaries.
final
addSemanticIndexes → bool
Matches SliverChildBuilderDelegate.addSemanticIndexes.
final
builderDelegate → PagedChildBuilderDelegate<ItemType>
Matches PagedLayoutBuilder.builderDelegate.
final
crossAxisSpacing → double
Matches SliverMasonryGrid.mainAxisSpacing.
final
fetchNextPage → NextPageCallback
Matches PagedLayoutBuilder.fetchNextPage.
final
gridDelegateBuilder → SliverSimpleGridDelegateBuilder
Provides the adjusted child count (based on the pagination status) so that a SliverSimpleGridDelegate can be returned.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisSpacing → double
Matches SliverMasonryGrid.mainAxisSpacing.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showNewPageErrorIndicatorAsGridChild → bool
Matches PagedSliverGrid.showNewPageErrorIndicatorAsGridChild.
final
showNewPageProgressIndicatorAsGridChild → bool
Matches PagedSliverGrid.showNewPageProgressIndicatorAsGridChild.
final
showNoMoreItemsIndicatorAsGridChild → bool
Matches PagedSliverGrid.showNoMoreItemsIndicatorAsGridChild.
final
shrinkWrapFirstPageIndicators → bool
Matches PagedLayoutBuilder.shrinkWrapFirstPageIndicators.
final
state → PagingState<PageKeyType, ItemType>
Matches PagedLayoutBuilder.state.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited