ChatList class

Animated list which handles automatic animations and pagination

Inheritance

Constructors

ChatList({Key? key, bool? isLastPage, Widget buildListContentContain(Widget chatList)?, required Widget itemBuilder(Object, int? index), required List<Object> items, Future<void> onEndReached()?, double? onEndReachedThreshold})
Creates a chat list widget
const

Properties

buildListContentContain → (Widget Function(Widget chatList)?)
创建消息列表容器
final
hashCode int
The hash code for this object.
no setterinherited
isLastPage bool?
Used for pagination (infinite scroll) together with onEndReached. When true, indicates that there are no more pages to load and pagination will not be triggered.
final
itemBuilder Widget Function(Object, int? index)
Item builder
final
items List<Object>
Items to build
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onEndReached → (Future<void> Function()?)
Used for pagination (infinite scroll). Called when user scrolls to the very end of the list (minus onEndReachedThreshold).
final
onEndReachedThreshold double?
Used for pagination (infinite scroll) together with onEndReached. Can be anything from 0 to 1, where 0 is immediate load of the next page as soon as scroll starts, and 1 is load of the next page only if scrolled to the very end of the list. Default value is 0.75, e.g. start loading next page when scrolled through about 3/4 of the available content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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