InfiniteSnapList<T> class

A smart wrapper that attaches an InfiniteSnapListBloc to a SnapList to provide seamless, bidirectional infinite scrolling.

Inheritance

Constructors

InfiniteSnapList({Key? key, required InfiniteSnapListBloc<T> bloc, required Widget itemBuilder(BuildContext context, T item, int index, bool isSelected, double centerProgress), InfiniteSnapListController<T>? controller, void onItemSelected(T item, int index)?, Axis scrollDirection = Axis.horizontal, AlignmentGeometry itemAlignment = Alignment.center, EdgeInsetsGeometry listPadding = EdgeInsets.zero, double? visibleItemCount, double itemWidth = 60, double itemHeight = 80, double itemSpacing = 12, double focusedItemScale = 1.0, double unfocusedItemScale = 1.0, double unfocusedItemOpacity = 1.0, EdgeInsetsGeometry? focusedItemPadding, double focusRange = 1.0, SnapBehavior snapBehavior = SnapBehavior.freeScroll, double maxFlingVelocity = 2000.0, Decoration? startEdgeDecoration, Decoration? endEdgeDecoration, double edgeDecorationSize = 40.0, Widget selectedItemOverlayBuilder(BuildContext, double, double)?, Color? selectedOverlayColor, BorderRadiusGeometry? selectedOverlayBorderRadius, Widget footerBuilder(BuildContext context, int currentIndex, int totalCount)?, Widget loadingItemBuilder(BuildContext context, double width, double height)?, int initialItemsCountForShimmer = 7, Widget loadingIndicatorBuilder(BuildContext)?, Widget emptyListBuilder(BuildContext)?, Widget errorBuilder(BuildContext, Exception)?, String semanticLabelBuilder(T item)?, ScrollPhysics scrollPhysics = const BouncingScrollPhysics(), Duration snapAnimationDuration = const Duration(milliseconds: 300), Curve snapAnimationCurve = Curves.easeOutQuart, bool enableKeyboardNavigation = true})
const

Properties

bloc InfiniteSnapListBloc<T>
final
controller InfiniteSnapListController<T>?
final
edgeDecorationSize double
final
emptyListBuilder Widget Function(BuildContext)?
final
enableKeyboardNavigation bool
final
endEdgeDecoration Decoration?
final
errorBuilder Widget Function(BuildContext, Exception)?
final
focusedItemPadding EdgeInsetsGeometry?
final
focusedItemScale double
final
focusRange double
final
footerBuilder Widget Function(BuildContext context, int currentIndex, int totalCount)?
final
hashCode int
The hash code for this object.
no setterinherited
initialItemsCountForShimmer int
final
itemAlignment AlignmentGeometry
final
itemBuilder Widget Function(BuildContext context, T item, int index, bool isSelected, double centerProgress)
final
itemHeight double
final
itemSpacing double
final
itemWidth double
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listPadding EdgeInsetsGeometry
final
loadingIndicatorBuilder Widget Function(BuildContext)?
final
loadingItemBuilder Widget Function(BuildContext context, double width, double height)?
final
maxFlingVelocity double
final
onItemSelected → void Function(T item, int index)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
final
scrollPhysics ScrollPhysics
final
selectedItemOverlayBuilder Widget Function(BuildContext, double, double)?
final
selectedOverlayBorderRadius BorderRadiusGeometry?
final
selectedOverlayColor Color?
final
semanticLabelBuilder String Function(T item)?
final
snapAnimationCurve Curve
final
snapAnimationDuration Duration
final
snapBehavior SnapBehavior
final
startEdgeDecoration Decoration?
final
unfocusedItemOpacity double
final
unfocusedItemScale double
final
visibleItemCount double?
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