SnappyListView class

Inheritance

Constructors

SnappyListView({Key? key, PageController? controller, ListVisualisation? visualisation, ItemPositionsListener? itemPositionsListener, SnapAlignment? snapAlignment, SnapAlignment? snapOnItemAlignment, required int itemCount, required Widget itemBuilder(BuildContext, int), ScrollBehavior? scrollBehavior, ScrollPhysics? physics, Axis scrollDirection = Axis.vertical, double? itemExtent, double? minCacheExtent, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, bool reverse = false, bool itemSnapping = false, void onPageChanged(int index, double size)?, PageOverscrollPhysics? overscrollPhysics, bool allowItemSizes = false, void onPageChange(double index, double size)?})
Creates PageView.builder with allowing dynamic sizes of items. This constructor is appropriate for page views with a large (or infinite) number of children with different sizes because the builder is called only for those children that are actually visible. See more PageView.builder

Properties

addAutomaticKeepAlives bool
Whether to wrap each child in an AutomaticKeepAlive.
final
addRepaintBoundaries bool
Whether to wrap each child in a RepaintBoundary.
final
addSemanticIndexes bool
Whether to wrap each child in an IndexedSemantics.
final
allowItemSizes bool
If allowItemSizes is true then each item will b resized accordingly to its the orthogonal scroll direction size. Sizes in scrollbar's will be applied by default
final
controller PageController
A normal controller for PageView or DynamicPageView. A page controller lets you manipulate which page is visible in a DynamicPageView. Currently pixel offset and viewport size are not supported. For more see: PageController
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder Widget Function(BuildContext, int)
Builds item by index Items are only build if they are needed. Make sure that the item pixel size is equivalent to the size passed to the itemSizeRetriever.
final
itemCount int
Number of items the itemBuilder can produce.
final
itemExtent double?
The itemExtent is the extend of each item that is not being scrolled. When scrolling this extend will result in a not noticeable jump. In other words, the scrolling is never able to come to a stop in the extend.
final
itemPositionsListener → ItemPositionsListener
Notifier that reports the items laid out in the list after each frame. See ScrollablePositionedList.addSemanticIndexes
final
itemSnapping bool
Set to false to disable page snapping, useful for custom scroll behavior. See PageView.pageSnapping
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minCacheExtent double?
The minimum cache extent used by the underlying scroll lists. See ScrollView.cacheExtent or ScrollablePositionedList.minCacheExtent.
final
onPageChange → void Function(double index, double size)?
Called whenever the position changes (scrolling). Returns both the current item and the size of the current item.
final
onPageChanged → void Function(int index, double size)?
Called whenever the snap point changes. Returns both the new index and the size of the current item.
final
overscrollPhysics PageOverscrollPhysics?
The parameter to control the overscroll physics when itemSnapping is true. If Null the normal PageView scrolling behavior will be taken.
final
physics ScrollPhysics?
How the page view should respond to user input. For example, determines how the page view continues to animate after the user stops dragging the page view. The physics are modified to snap to page boundaries using PageScrollPhysics prior to being used. If an explicit ScrollBehavior is provided to scrollBehavior, the ScrollPhysics provided by that behavior will take precedence after physics. Defaults to matching platform conventions.
final
reverse bool
Whether the view scrolls in the reading direction.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
A ScrollBehavior that will be applied to this widget individually. See PageView.scrollBehavior
final
scrollDirection Axis
The axis along which the page view scrolls. Defaults to Axis.horizontal.
final
snapAlignment SnapAlignment
Controls the percentage position of the snap point in the viewport. Meaning if snapAlignment is 0, the snap point is at the top/left, while 1 would be to the right/bottom based on scrollDirection Default is SnapAlignment.static(0.5);
final
snapOnItemAlignment SnapAlignment
Controls the percentage position of the snap point in on each item. Meaning if snapAlignment is 0, the snap point is at the top/left of the item, while 1 would be to the right/bottom based on scrollDirection Default is SnapAlignment.static(0.5);
final
visualisation ListVisualisation
Configures how each item should be displayed and act, according to its position in the list. Default is ListVisualisation.normal()
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SnappyListView>
Creates the mutable state for this widget at a given location in the tree.
override
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