PagedMasonryGridView<PageKeyType, ItemType> class

A MasonryGridView with pagination capabilities.

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

This is a wrapper around 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

PagedMasonryGridView({required PagingController<PageKeyType, ItemType> pagingController, required PagedChildBuilderDelegate<ItemType> builderDelegate, required SliverSimpleGridDelegateBuilder gridDelegateBuilder, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController? scrollController, bool? primary, ScrollPhysics? physics, EdgeInsetsGeometry? padding, double mainAxisSpacing = 0.0, double crossAxisSpacing = 0.0, double? cacheExtent, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, String? restorationId, Clip clipBehavior = Clip.hardEdge, bool shrinkWrap = false, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, Key? key})
const
PagedMasonryGridView.count({required PagingController<PageKeyType, ItemType> pagingController, required PagedChildBuilderDelegate<ItemType> builderDelegate, required int crossAxisCount, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController? scrollController, bool? primary, ScrollPhysics? physics, EdgeInsetsGeometry? padding, double mainAxisSpacing = 0.0, double crossAxisSpacing = 0.0, double? cacheExtent, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, String? restorationId, Clip clipBehavior = Clip.hardEdge, bool shrinkWrap = false, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, Key? key})
Equivalent to MasonryGridView.count.
PagedMasonryGridView.extent({required PagingController<PageKeyType, ItemType> pagingController, required PagedChildBuilderDelegate<ItemType> builderDelegate, required double maxCrossAxisExtent, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController? scrollController, bool? primary, ScrollPhysics? physics, EdgeInsetsGeometry? padding, double mainAxisSpacing = 0.0, double crossAxisSpacing = 0.0, double? cacheExtent, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, String? restorationId, Clip clipBehavior = Clip.hardEdge, bool shrinkWrap = false, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, Key? key})
Equivalent to MasonryGridView.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
cacheExtent double?
Matches ScrollView.cacheExtent.
final
clipBehavior Clip
Matches ScrollView.clipBehavior.
final
crossAxisSpacing double
final
dragStartBehavior DragStartBehavior
Matches ScrollView.dragStartBehavior.
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
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior
Matches ScrollView.keyboardDismissBehavior.
final
mainAxisSpacing double
final
padding EdgeInsetsGeometry?
Matches BoxScrollView.padding.
final
pagingController PagingController<PageKeyType, ItemType>
Matches PagedLayoutBuilder.pagingController.
final
physics ScrollPhysics?
Matches ScrollView.physics.
final
primary bool?
Matches ScrollView.primary.
final
restorationId String?
Matches ScrollView.restorationId.
final
reverse bool
Matches ScrollView.reverse
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
Matches ScrollView.controller
final
scrollDirection Axis
Matches ScrollView.scrollDirection
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}) 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