ChatList constructor

const ChatList({
  1. Key? key,
  2. int msgCount = 0,
  3. required String onMsgKey(
    1. int index
    ),
  4. required Widget itemBuilder(
    1. BuildContext context,
    2. int index
    ),
  5. String? latestReadMsgKey,
  6. bool showUnreadMsgButton = true,
  7. int unreadMsgCount = 0,
  8. Position unreadMsgButtonPosition = const Position(right: 0, top: 20),
  9. Widget unreadMsgButtonBuilder(
    1. BuildContext context,
    2. int unreadCount
    )?,
  10. Widget unreadMsgTipBuilder(
    1. BuildContext context,
    2. int unreadCount
    )?,
  11. Future onLoadMsgsByLatestReadMsgKey()?,
  12. double offsetFromUnreadTipToTop = 50,
  13. bool hasMoreMsgs = false,
  14. bool hasPrevMsgs = false,
  15. double? offsetToTriggerLoadMore,
  16. double? offsetToTriggerLoadPrev,
  17. Future onLoadMoreMsgs()?,
  18. Future onLoadPrevMsgs()?,
  19. Widget loadMoreProgressBuilder(
    1. BuildContext context,
    2. LoadStatus? status
    )?,
  20. Widget loadPrevProgressBuilder(
    1. BuildContext context,
    2. RefreshStatus? status
    )?,
  21. bool showReceivedMsgButton = true,
  22. Position receivedMsgButtonPosition = const Position(right: 0, bottom: 20),
  23. Widget receivedMsgButtonBuilder(
    1. BuildContext context,
    2. int newCount
    )?,
  24. bool onIsReceiveMessage(
    1. int index
    )?,
  25. bool showScrollToTopButton = true,
  26. double offsetToShowScrollToTop = 400,
  27. Widget scrollToTopButtonBuilder(
    1. BuildContext context
    )?,
  28. ScrollPhysics? physics,
  29. ScrollBehavior? scrollBehavior,
  30. Future onLoadTopMsgs()?,
  31. 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);