ChatItemView constructor
const
ChatItemView({
- Key? key,
- required int index,
- required bool isSingleChat,
- required Message message,
- CustomItemBuilder? customItemBuilder,
- required Subject<
int> clickSubject, - required Subject<
MsgStreamEv< msgSendStatusSubject,bool> > - required Subject<
MsgStreamEv< msgSendProgressSubject,int> > - bool isBubbleMsg = true,
- Color leftBubbleColor = const Color(0xFFF0F0F0),
- Color rightBubbleColor = const Color(0xFFDCEBFE),
- dynamic onLongPressRightAvatar()?,
- dynamic onTapRightAvatar()?,
- dynamic onLongPressLeftAvatar()?,
- dynamic onTapLeftAvatar()?,
- ItemVisibilityChange? visibilityChange,
- Map<
String, String> allAtMap = const {}, - ValueChanged<
String> ? onClickAtText, - EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- TextStyle? textStyle,
- TextStyle? atTextStyle,
- TextStyle? timeStyle,
- TextStyle? hintTextStyle,
- double textScaleFactor = 1.0,
- double? avatarSize,
- String? timeStr,
- dynamic onTapCopyMenu()?,
- dynamic onTapDelMenu()?,
- dynamic onTapForwardMenu()?,
- dynamic onTapReplyMenu()?,
- dynamic onTapRevokeMenu()?,
- dynamic onTapMultiMenu()?,
- dynamic onTapTranslationMenu()?,
- dynamic onTapAddEmojiMenu()?,
- bool enabledCopyMenu = true,
- bool enabledMultiMenu = true,
- bool enabledDelMenu = true,
- bool enabledForwardMenu = true,
- bool enabledReplyMenu = true,
- bool enabledRevokeMenu = true,
- bool enabledTranslationMenu = true,
- bool enabledAddEmojiMenu = true,
- bool multiSelMode = false,
- dynamic onMultiSelChanged(
- bool checked
- List<
Message> multiList = const [], - dynamic onTapQuoteMsg()?,
- List<
MatchPattern> patterns = const [], - bool delaySendingStatus = false,
- bool enabledReadStatus = true,
- int readingDuration = 30,
- bool isPrivateChat = false,
- dynamic onDestroyMessage()?,
- dynamic onViewMessageReadStatus()?,
- dynamic onFailedResend()?,
- CustomMessageBuilder? customMessageBuilder,
- CustomAvatarBuilder? customLeftAvatarBuilder,
- CustomAvatarBuilder? customRightAvatarBuilder,
- Color? highlightColor,
- bool isPlayingSound = false,
- dynamic onPopMenuShowChanged(
- bool show
- String? leftName,
- String? rightName,
- String? leftAvatarUrl,
- String? rightAvatarUrl,
- bool showNoticeMessage = false,
- bool showLongPressMenu = true,
- BoxDecoration? timeDecoration,
- EdgeInsetsGeometry? timePadding,
- 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);