PaginationConfig class

Configuration for pagination in the chat UI.

Constructors

PaginationConfig({bool enabled = false, double loadingIndicatorOffset = 100.0, Widget loadMoreIndicator({required bool isLoading})?, bool reverseOrder = true, Duration loadingDelay = const Duration(milliseconds: 500), Duration loadMoreDebounceTime = const Duration(milliseconds: 200), bool autoLoadOnScroll = true, double distanceToTriggerLoadPixels = 100.0, double scrollThreshold = 0.1, bool enableHapticFeedback = true, Widget loadingBuilder()?, Widget noMoreMessagesBuilder()?, double cacheExtent = 300.0, String loadingText = 'Loading...', String noMoreMessagesText = 'No more messages'})
const

Properties

autoLoadOnScroll bool
Whether to automatically load more messages when scrolling
final
cacheExtent double
Cache extent for ListView
final
distanceToTriggerLoadPixels double
Distance in pixels from edge to trigger loading
final
enabled bool
Whether pagination is enabled
final
enableHapticFeedback bool
Whether to enable haptic feedback when loading more messages
final
hashCode int
The hash code for this object.
no setterinherited
loadingBuilder Widget Function()?
Builder for loading indicator widget
final
loadingDelay Duration
Simulated delay for loading more messages
final
loadingIndicatorOffset double
Offset from the top at which to show the loading indicator
final
loadingText String
Text for loading indicator
final
loadMoreDebounceTime Duration
Time to debounce scroll events
final
loadMoreIndicator Widget Function({required bool isLoading})?
Custom loading indicator widget for pagination
final
noMoreMessagesBuilder Widget Function()?
Builder for "no more messages" widget
final
noMoreMessagesText String
Text for "no more messages" indicator
final
reverseOrder bool
Reverse order of messages (newest at bottom)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollThreshold double
Scroll position threshold to trigger loading (0.0 to 1.0)
final

Methods

copyWith({bool? enabled, double? loadingIndicatorOffset, Widget loadMoreIndicator({required bool isLoading})?, bool? reverseOrder, Duration? loadingDelay, Duration? loadMoreDebounceTime, bool? autoLoadOnScroll, double? distanceToTriggerLoadPixels, double? scrollThreshold, bool? enableHapticFeedback, Widget loadingBuilder()?, Widget noMoreMessagesBuilder()?, double? cacheExtent, String? loadingText, String? noMoreMessagesText}) PaginationConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited