ChatItemWidget constructor

const ChatItemWidget({
  1. Key? key,
  2. required Rx<ChatItem> item,
  3. required Rx<Chat?> chat,
  4. required UserId me,
  5. RxUser? user,
  6. bool withName = false,
  7. bool withAvatar = true,
  8. bool appendAvatarPadding = true,
  9. bool selectable = true,
  10. Iterable<LastChatRead> reads = const [],
  11. FutureOr<RxUser?> getUser(
    1. UserId userId
    )?,
  12. FutureOr<Rx<ChatItem>?> getItem(
    1. ChatItemId itemId
    )?,
  13. void onHide()?,
  14. void onDelete()?,
  15. void onReply(
    1. ChatItem
    )?,
  16. void onEdit()?,
  17. void onCopy(
    1. String text
    )?,
  18. Paginated<ChatItemId, Rx<ChatItem>> onGallery()?,
  19. void onRepliedTap(
    1. ChatItemQuote
    )?,
  20. void onResend()?,
  21. void onFileTap(
    1. FileAttachment
    )?,
  22. Future<void> onAttachmentError(
    1. ChatItem?
    )?,
  23. void onDownload(
    1. List<Attachment>
    )?,
  24. void onDownloadAs(
    1. List<Attachment>
    )?,
  25. void onSave(
    1. List<Attachment>
    )?,
  26. void onSelect()?,
  27. void onSearch()?,
  28. void onUserPressed(
    1. User
    ) = _defaultOnUserPressed,
  29. void onDragging(
    1. bool
    )?,
  30. void onAnimateTo(
    1. ChatItem
    )?,
})

Implementation

const ChatItemWidget({
  super.key,
  required this.item,
  required this.chat,
  required this.me,
  this.user,
  this.withName = false,
  this.withAvatar = true,
  this.appendAvatarPadding = true,
  this.selectable = true,
  this.reads = const [],
  this.getUser,
  this.getItem,
  this.onHide,
  this.onDelete,
  this.onReply,
  this.onEdit,
  this.onCopy,
  this.onGallery,
  this.onRepliedTap,
  this.onResend,
  this.onFileTap,
  this.onAttachmentError,
  this.onDownload,
  this.onDownloadAs,
  this.onSave,
  this.onSelect,
  this.onSearch,
  this.onUserPressed = _defaultOnUserPressed,
  this.onDragging,
  this.onAnimateTo,
});