ChatList constructor
const
ChatList({
- Key? key,
- int msgCount = 0,
- required String onMsgKey(
- int index
- required Widget itemBuilder(
- BuildContext context,
- int index
- String? latestReadMsgKey,
- bool showUnreadMsgButton = true,
- int unreadMsgCount = 0,
- Position unreadMsgButtonPosition = const Position(right: 0, top: 20),
- Widget unreadMsgButtonBuilder(
- BuildContext context,
- int unreadCount
- Widget unreadMsgTipBuilder(
- BuildContext context,
- int unreadCount
- Future onLoadMsgsByLatestReadMsgKey()?,
- double offsetFromUnreadTipToTop = 50,
- bool hasMoreMsgs = false,
- bool hasPrevMsgs = false,
- double? offsetToTriggerLoadMore,
- double? offsetToTriggerLoadPrev,
- Future onLoadMoreMsgs()?,
- Future onLoadPrevMsgs()?,
- Widget loadMoreProgressBuilder(
- BuildContext context,
- LoadStatus? status
- Widget loadPrevProgressBuilder(
- BuildContext context,
- RefreshStatus? status
- bool showReceivedMsgButton = true,
- Position receivedMsgButtonPosition = const Position(right: 0, bottom: 20),
- Widget receivedMsgButtonBuilder(
- BuildContext context,
- int newCount
- bool onIsReceiveMessage(
- int index
- bool showScrollToTopButton = true,
- double offsetToShowScrollToTop = 400,
- Widget scrollToTopButtonBuilder(
- BuildContext context
- ScrollPhysics? physics,
- ScrollBehavior? scrollBehavior,
- Future onLoadTopMsgs()?,
- ChatListController? controller,
Implementation
const ChatList({
Key? key,
this.msgCount = 0,
required this.onMsgKey,
required this.itemBuilder,
this.latestReadMsgKey,
this.showUnreadMsgButton = true,
this.unreadMsgCount = 0,
this.unreadMsgButtonPosition = const Position(right: 0, top: 20),
this.unreadMsgButtonBuilder,
this.unreadMsgTipBuilder,
this.onLoadMsgsByLatestReadMsgKey,
this.offsetFromUnreadTipToTop = 50,
this.hasMoreMsgs = false,
this.hasPrevMsgs = false,
this.offsetToTriggerLoadMore,
this.offsetToTriggerLoadPrev,
this.onLoadMoreMsgs,
this.onLoadPrevMsgs,
this.loadMoreProgressBuilder,
this.loadPrevProgressBuilder,
this.showReceivedMsgButton = true,
this.receivedMsgButtonPosition = const Position(right: 0, bottom: 20),
this.receivedMsgButtonBuilder,
this.onIsReceiveMessage,
this.showScrollToTopButton = true,
this.offsetToShowScrollToTop = 400,
this.scrollToTopButtonBuilder,
this.physics,
this.scrollBehavior,
this.onLoadTopMsgs,
this.controller,
}) : super(key: key);