ChatSingleLayout constructor

const ChatSingleLayout({
  1. Key? key,
  2. required Widget child,
  3. required String msgId,
  4. required int index,
  5. required bool isSingleChat,
  6. required Widget menuBuilder(),
  7. required Sink<int> clickSink,
  8. required Stream<MsgStreamEv<bool>>? sendStatusStream,
  9. required CustomPopupMenuController popupCtrl,
  10. required bool isReceivedMsg,
  11. String? rightAvatar,
  12. String? leftAvatar,
  13. required String? leftName,
  14. double avatarSize = 42.0,
  15. bool? isUnread,
  16. Color leftBubbleColor = const Color(0xFFF0F0F0),
  17. Color rightBubbleColor = const Color(0xFFDCEBFE),
  18. dynamic onLongPressRightAvatar()?,
  19. dynamic onTapRightAvatar()?,
  20. dynamic onLongPressLeftAvatar()?,
  21. dynamic onTapLeftAvatar()?,
  22. bool isSendFailed = false,
  23. bool isSending = true,
  24. Widget? timeView,
  25. Widget? quoteView,
  26. bool isBubbleBg = true,
  27. bool isHintMsg = false,
  28. bool checked = false,
  29. bool showRadio = false,
  30. dynamic onRadioChanged(
    1. bool checked
    )?,
  31. bool delaySendingStatus = false,
  32. bool enabledReadStatus = true,
  33. int readingDuration = 0,
  34. bool isPrivateChat = false,
  35. dynamic onStartDestroy()?,
  36. int haveReadCount = 0,
  37. int needReadCount = 0,
  38. dynamic viewMessageReadStatus()?,
  39. dynamic failedResend()?,
  40. CustomAvatarBuilder? customLeftAvatarBuilder,
  41. CustomAvatarBuilder? customRightAvatarBuilder,
  42. bool haveUsableMenu = true,
  43. bool showLongPressMenu = true,
  44. bool isVoiceMessage = false,
})

Implementation

const ChatSingleLayout({
  Key? key,
  required this.child,
  required this.msgId,
  required this.index,
  required this.isSingleChat,
  required this.menuBuilder,
  required this.clickSink,
  required this.sendStatusStream,
  required this.popupCtrl,
  required this.isReceivedMsg,
  this.rightAvatar,
  this.leftAvatar,
  required this.leftName,
  this.avatarSize = 42.0,
  this.isUnread,
  this.leftBubbleColor = const Color(0xFFF0F0F0),
  this.rightBubbleColor = const Color(0xFFDCEBFE),
  this.onLongPressRightAvatar,
  this.onTapRightAvatar,
  this.onLongPressLeftAvatar,
  this.onTapLeftAvatar,
  this.isSendFailed = false,
  this.isSending = true,
  this.timeView,
  this.quoteView,
  this.isBubbleBg = true,
  this.isHintMsg = false,
  this.checked = false,
  this.showRadio = false,
  this.onRadioChanged,
  this.delaySendingStatus = false,
  this.enabledReadStatus = true,
  this.readingDuration = 0,
  this.isPrivateChat = false,
  this.onStartDestroy,
  this.haveReadCount = 0,
  this.needReadCount = 0,
  this.viewMessageReadStatus,
  this.failedResend,
  this.customLeftAvatarBuilder,
  this.customRightAvatarBuilder,
  this.haveUsableMenu = true,
  this.showLongPressMenu = true,
  this.isVoiceMessage = false,
}) : super(key: key);