ChatSingleLayout constructor
const
ChatSingleLayout({
- Key? key,
- required Widget child,
- required String msgId,
- required int index,
- required bool isSingleChat,
- required Sink<
int> clickSink, - required Stream<
MsgStreamEv< ? sendStatusStream,bool> > - required CustomPopupMenuController popupCtrl,
- required bool isReceivedMsg,
- String? rightAvatar,
- String? leftAvatar,
- required String? leftName,
- double avatarSize = 42.0,
- bool? isUnread,
- Color leftBubbleColor = const Color(0xFFF0F0F0),
- Color rightBubbleColor = const Color(0xFFDCEBFE),
- dynamic onLongPressRightAvatar()?,
- dynamic onTapRightAvatar()?,
- dynamic onLongPressLeftAvatar()?,
- dynamic onTapLeftAvatar()?,
- bool isSendFailed = false,
- bool isSending = true,
- Widget? timeView,
- Widget? quoteView,
- bool isBubbleBg = true,
- bool isHintMsg = false,
- bool checked = false,
- bool showRadio = false,
- dynamic onRadioChanged(
- bool checked
- bool delaySendingStatus = false,
- bool enabledReadStatus = true,
- int readingDuration = 0,
- bool isPrivateChat = false,
- dynamic onStartDestroy()?,
- int haveReadCount = 0,
- int needReadCount = 0,
- dynamic viewMessageReadStatus()?,
- dynamic failedResend()?,
- CustomAvatarBuilder? customLeftAvatarBuilder,
- CustomAvatarBuilder? customRightAvatarBuilder,
- bool haveUsableMenu = true,
- bool showLongPressMenu = true,
- 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);