Pagewise<T> class
abstract
An abstract base class for widgets that fetch their content one page at a time.
The widget fetches the page when we scroll down to it, and then keeps it in memory
You can build your own Pagewise widgets by extending this class and returning your builder in the builder function which provides you with the Pagewise state. Look PagewiseListView and PagewiseGridView for examples.
See also:
- PagewiseGridView, a Pagewise implementation of GridView
- PagewiseListView, a Pagewise implementation of ListView
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Pagewise
- Implementers
Constructors
-
Pagewise({int? pageSize, PageFuture<
T> ? pageFuture, Key? key, PagewiseLoadController<T> ? pageLoadController, LoadingBuilder? loadingBuilder, RetryBuilder? retryBuilder, NoItemsFoundBuilder? noItemsFoundBuilder, bool showRetry = true, required ItemBuilder<T> itemBuilder, ItemBuilder<T> ? itemDummyBuilder, int? itemDummyCount, ErrorBuilder? errorBuilder, required PagewiseBuilder<T> builder}) -
Creates a pagewise widget.
const
Properties
-
builder
→ PagewiseBuilder<
T> -
The actual builder that builds the Pagewise widget. It is called and
provided the PagewiseState. This function is important only for classes
extending Pagewise. See PagewiseListView and PagewiseGridView for
examples.
final
- errorBuilder → ErrorBuilder?
-
Called with an error object if an error occurs when loading the page
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemBuilder
→ ItemBuilder<
T> -
Called to build each entry in the view.
final
-
itemDummyBuilder
→ ItemBuilder<
T> ? -
final
- itemDummyCount → int?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → LoadingBuilder?
-
Called when loading each page.
final
- noItemsFoundBuilder → NoItemsFoundBuilder?
-
Called when no items are found
final
-
pageFuture
→ PageFuture<
T> ? -
Called whenever a new page (or batch) is to be fetched
final
-
pageLoadController
→ PagewiseLoadController<
T> ? -
The controller that controls the loading of pages.
final
- pageSize → int?
-
The number of entries per page
final
- retryBuilder → RetryBuilder?
-
Called when a page fails to load and showRetry is set to true.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showRetry → bool
-
Whether to show a retry button when page fails to load.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → PagewiseState< 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}) → 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