InfinitePaginatedScroll<T> class

A wrapper designed to show infinite pagination. T type is defined for the kind of elements to be displayed.

Inheritance

Constructors

InfinitePaginatedScroll({required InfinitePaginatedScrollFuture<T> future, required InfinitePaginatedScrollBuilder<T> builder, Key? key, InfinitePaginatedScrollController? controller, FilterFn<T>? filterFn, Key? paginationKey, double bottomSpacing = 0, WidgetBuilder? header, int pageNumber = 1, int pageSize = 10, double topSpacing = 0, bool disableScroll = false, bool disableRefresh = false, ScrollController? scrollController, bool shrinkWrap = false, bool listEndIndicator = true, Object onError(Object error)?, void onFetch(int pageNumber, int pageKey)?, PaginationBuilders? paginationBuilders})
const

Properties

bottomSpacing double
Spacing to add to the bottom of the list.
final
builder InfinitePaginatedScrollBuilder<T>
final
controller InfinitePaginatedScrollController?
A controller to call the refresh function if required.
final
disableRefresh bool
final
disableScroll bool
Disable scrolling.
final
filterFn FilterFn<T>?
Filter the results before displaying them. Gives the list of results that can be modified and returned.
final
future InfinitePaginatedScrollFuture<T>
The future to fetch data to display from. Gives you the current pageNumber and pageSize, in that order.
final
hashCode int
The hash code for this object.
no setterinherited
Header to show above the list.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listEndIndicator bool
Show the list end indicator or not.
final
onError Object Function(Object error)?
final
onFetch → void Function(int pageNumber, int pageKey)?
final
pageNumber int
Page Number to start with. Default value is 1.
final
pageSize int
Total number of elements in each page. Default value is 10.
final
paginationBuilders PaginationBuilders?
final
paginationKey Key?
Key to give the infinite scroll wrapper to force it to rebuild the list on new data,
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
ListView ScrollController.
final
shrinkWrap bool
final
topSpacing double
Spacing to add to the top of the list.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() InfinitePaginatedScrollState<T>
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, 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