ChatItemView constructor

const ChatItemView({
  1. Key? key,
  2. required int index,
  3. required bool isSingleChat,
  4. required Message message,
  5. CustomItemBuilder? customItemBuilder,
  6. required Subject<int> clickSubject,
  7. required Subject<MsgStreamEv<bool>> msgSendStatusSubject,
  8. required Subject<MsgStreamEv<int>> msgSendProgressSubject,
  9. bool isBubbleMsg = true,
  10. Color leftBubbleColor = const Color(0xFFF0F0F0),
  11. Color rightBubbleColor = const Color(0xFFDCEBFE),
  12. dynamic onLongPressRightAvatar()?,
  13. dynamic onTapRightAvatar()?,
  14. dynamic onLongPressLeftAvatar()?,
  15. dynamic onTapLeftAvatar()?,
  16. ItemVisibilityChange? visibilityChange,
  17. Map<String, String> allAtMap = const {},
  18. ValueChanged<String>? onClickAtText,
  19. List<MenuInfo>? menus,
  20. dynamic menuStyle,
  21. EdgeInsetsGeometry? padding,
  22. EdgeInsetsGeometry? margin,
  23. TextStyle? textStyle,
  24. TextStyle? atTextStyle,
  25. TextStyle? timeStyle,
  26. TextStyle? hintTextStyle,
  27. double textScaleFactor = 1.0,
  28. double? avatarSize,
  29. String? timeStr,
  30. dynamic onTapCopyMenu()?,
  31. dynamic onTapDelMenu()?,
  32. dynamic onTapForwardMenu()?,
  33. dynamic onTapReplyMenu()?,
  34. dynamic onTapRevokeMenu()?,
  35. dynamic onTapMultiMenu()?,
  36. dynamic onTapTranslationMenu()?,
  37. dynamic onTapAddEmojiMenu()?,
  38. bool enabledCopyMenu = true,
  39. bool enabledMultiMenu = true,
  40. bool enabledDelMenu = true,
  41. bool enabledForwardMenu = true,
  42. bool enabledReplyMenu = true,
  43. bool enabledRevokeMenu = true,
  44. bool enabledTranslationMenu = true,
  45. bool enabledAddEmojiMenu = true,
  46. bool multiSelMode = false,
  47. dynamic onMultiSelChanged(
    1. bool checked
    )?,
  48. List<Message> multiList = const [],
  49. dynamic onTapQuoteMsg()?,
  50. List<MatchPattern> patterns = const [],
  51. bool delaySendingStatus = false,
  52. bool enabledReadStatus = true,
  53. int readingDuration = 30,
  54. bool isPrivateChat = false,
  55. dynamic onDestroyMessage()?,
  56. dynamic onViewMessageReadStatus()?,
  57. dynamic onFailedResend()?,
  58. CustomMessageBuilder? customMessageBuilder,
  59. CustomAvatarBuilder? customLeftAvatarBuilder,
  60. CustomAvatarBuilder? customRightAvatarBuilder,
  61. Color? highlightColor,
  62. bool isPlayingSound = false,
  63. dynamic onPopMenuShowChanged(
    1. bool show
    )?,
  64. String? leftName,
  65. String? rightName,
  66. String? leftAvatarUrl,
  67. String? rightAvatarUrl,
  68. bool showNoticeMessage = false,
  69. bool showLongPressMenu = true,
  70. BoxDecoration? timeDecoration,
  71. EdgeInsetsGeometry? timePadding,
  72. Subject<bool>? popPageCloseMenuSubject,
})

Implementation

const ChatItemView({
  Key? key,
  required this.index,
  required this.isSingleChat,
  required this.message,
  this.customItemBuilder,
  required this.clickSubject,
  required this.msgSendStatusSubject,
  required this.msgSendProgressSubject,
  this.isBubbleMsg = true,
  this.leftBubbleColor = const Color(0xFFF0F0F0),
  this.rightBubbleColor = const Color(0xFFDCEBFE),
  this.onLongPressRightAvatar,
  this.onTapRightAvatar,
  this.onLongPressLeftAvatar,
  this.onTapLeftAvatar,
  this.visibilityChange,
  this.allAtMap = const {},
  this.onClickAtText,
  this.menus,
  this.menuStyle,
  this.padding,
  this.margin,
  this.textStyle,
  this.atTextStyle,
  this.timeStyle,
  this.hintTextStyle,
  this.textScaleFactor = 1.0,
  this.avatarSize,
  this.timeStr,
  this.onTapCopyMenu,
  this.onTapDelMenu,
  this.onTapForwardMenu,
  this.onTapReplyMenu,
  this.onTapRevokeMenu,
  this.onTapMultiMenu,
  this.onTapTranslationMenu,
  this.onTapAddEmojiMenu,
  this.enabledCopyMenu = true,
  this.enabledMultiMenu = true,
  this.enabledDelMenu = true,
  this.enabledForwardMenu = true,
  this.enabledReplyMenu = true,
  this.enabledRevokeMenu = true,
  this.enabledTranslationMenu = true,
  this.enabledAddEmojiMenu = true,
  this.multiSelMode = false,
  this.onMultiSelChanged,
  this.multiList = const [],
  this.onTapQuoteMsg,
  this.patterns = const [],
  this.delaySendingStatus = false,
  this.enabledReadStatus = true,
  this.readingDuration = 30,
  this.isPrivateChat = false,
  this.onDestroyMessage,
  this.onViewMessageReadStatus,
  this.onFailedResend,
  this.customMessageBuilder,
  this.customLeftAvatarBuilder,
  this.customRightAvatarBuilder,
  this.highlightColor,
  this.isPlayingSound = false,
  this.onPopMenuShowChanged,
  this.leftName,
  this.rightName,
  this.leftAvatarUrl,
  this.rightAvatarUrl,
  this.showNoticeMessage = false,
  this.showLongPressMenu = true,
  this.timeDecoration,
  this.timePadding,
  this.popPageCloseMenuSubject,
}) : super(key: key);