PagedCompactList<T> class

PagedCompactList is a lazy loading list with a Load More button.

The widget handles the state management for the list items. The innitial items are loaded in automatincally, however, The PagedCompactListController and the loader are used to manage the adding of additional items.

the Builder allows for complete control over the display of those items.

The widget has an INITIAL_PAGE_SIZE for showing a minimal set items, and a PAGE_SIZE that determines the amount of items being added.

A title is displayed above the list.

Inheritance

Constructors

PagedCompactList({Key? key, required PagedCompactListLoader<T> loader, required PagedCompactListBuilder<T> builder, required Widget child, int loadSize = PAGE_SIZE, PagedCompactListController<T>? controller, String? title})
const

Properties

builder PagedCompactListBuilder<T>
Item builder used to display indexed items
final
child Widget
Load more child Button
final
controller PagedCompactListController<T>?
Controller for the PagedCompactList.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loader PagedCompactListLoader<T>
The loader is a function that uses the the next size of the list to provide a way for the widget to load items into its state.
final
loadSize int
Used by the loader to increment the items list.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
Title of the list. Does not build if not defined.
final

Methods

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

Constants

PAGE_SIZE → const int
Default for loadSize