ChatList class

Animated list that handles automatic animations and pagination.

Inheritance

Constructors

ChatList({Key? key, Widget? bottomWidget, required BubbleRtlAlignment bubbleRtlAlignment, bool? isLastPage, required Widget itemBuilder(Object, int? index), required List<Object> items, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, Future<void> onEndReached()?, double? onEndReachedThreshold, required ScrollController scrollController, ScrollPhysics? scrollPhysics, TypingIndicatorOptions? typingIndicatorOptions, required bool useTopSafeAreaInset})
Creates a chat list widget.
const

Properties

bottomWidget Widget?
A custom widget at the bottom of the list.
final
bubbleRtlAlignment BubbleRtlAlignment
Used to set alignment of typing indicator. See BubbleRtlAlignment.
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
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior
A representation of how a ScrollView should dismiss the on-screen keyboard.
final
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
scrollController ScrollController
Scroll controller for the main CustomScrollView. Also used to auto scroll to specific messages.
final
scrollPhysics ScrollPhysics?
Determines the physics of the scroll view.
final
typingIndicatorOptions TypingIndicatorOptions?
Used to build typing indicator according to options. See TypingIndicatorOptions.
final
useTopSafeAreaInset bool
Whether to use top safe area inset for the list.
final

Methods

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