ChatItemView class
chat item
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChatItemView
Constructors
-
ChatItemView({Key? key, required int index, required bool isSingleChat, required Message message, CustomItemBuilder? customItemBuilder, required Subject<
int> clickSubject, required Subject<MsgStreamEv< msgSendStatusSubject, required Subject<bool> >MsgStreamEv< msgSendProgressSubject, bool isBubbleMsg = true, Color leftBubbleColor = const Color(0xFFF0F0F0), Color rightBubbleColor = const Color(0xFFDCEBFE), dynamic onLongPressRightAvatar()?, dynamic onTapRightAvatar()?, dynamic onLongPressLeftAvatar()?, dynamic onTapLeftAvatar()?, ItemVisibilityChange? visibilityChange, Map<int> >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}) -
const
Properties
-
allAtMap
→ Map<
String, String> -
all user info
key:userid,value:username
@信息列表,key:用户id,value:用户名
final
- atTextStyle → TextStyle?
-
@ message style
@消息的文字样式
final
- avatarSize → double?
-
头像大小
final
-
clickSubject
→ Subject<
int> -
Click on the message to process voice playback, video playback, picture preview, etc.
final
- customItemBuilder → CustomItemBuilder?
-
Customize the display style of messages,
such as system messages or status messages such as withdrawal
自定义消息item view
final
- customLeftAvatarBuilder → CustomAvatarBuilder?
-
自定义头像
final
- customMessageBuilder → CustomMessageBuilder?
-
MessageType.custom
final
- customRightAvatarBuilder → CustomAvatarBuilder?
-
final
- delaySendingStatus → bool
-
是否在发送消息时,延迟显示消息发送中状态,既延迟显示加载框
final
- enabledAddEmojiMenu → bool
-
final
- enabledCopyMenu → bool
-
Click the copy button event on the menu
final
- enabledDelMenu → bool
-
Click the delete button event on the menu
final
- enabledForwardMenu → bool
-
Click the forward button event on the menu
final
- enabledMultiMenu → bool
-
final
- enabledReadStatus → bool
-
显示消息已读
final
- enabledReplyMenu → bool
-
Click the reply button event on the menu
final
- enabledRevokeMenu → bool
-
Click the revoke button event on the menu
final
- enabledTranslationMenu → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightColor → Color?
-
final
- hintTextStyle → TextStyle?
-
hint message style
提示消息的样式,如:时间,xx撤回了一条消息等
final
- index → int
-
listview index
final
- isBubbleMsg → bool
-
When you need to customize the message style,
Whether to use a bubble container
自定义消息item view时,是否使用默认的起泡背景
final
- isPlayingSound → bool
-
当前播放的语音消息
final
- isPrivateChat → bool
-
是否开启阅后即焚
final
- isSingleChat → bool
-
if current is group chat : false
if current is single chat : true
true 单聊,false 群聊
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftAvatarUrl → String?
-
final
- leftBubbleColor → Color
-
Message background on the left side of the chat window
收到的消息的气泡的背景色
final
- leftName → String?
-
final
- margin → EdgeInsetsGeometry?
-
final
-
long press menu list
长按消息起泡弹出的菜单列表
final
-
menu list style
菜单样式
final
- message → Message
-
OpenIM Message
final
-
msgSendProgressSubject
→ Subject<
MsgStreamEv< int> > -
The progress of sending messages, such as the progress of uploading pictures, videos, and files
消息的发送进度
final
-
msgSendStatusSubject
→ Subject<
MsgStreamEv< bool> > -
The status of message sending,
there are two kinds of success or failure, true success, false failure
消息发送状态:成功,失败,发送中
final
-
multiList
→ List<
Message> -
被选择的消息
final
- multiSelMode → bool
-
当前是否是多选模式
final
-
onClickAtText
→ ValueChanged<
String> ? -
Click the @ content
final
- onDestroyMessage → (dynamic Function()?)
-
阅后即焚回调
final
- onFailedResend → (dynamic Function()?)
-
失败重发
final
- onLongPressLeftAvatar → (dynamic Function()?)
-
final
- onLongPressRightAvatar → (dynamic Function()?)
-
final
- onMultiSelChanged → (dynamic Function(bool checked)?)
-
final
- onPopMenuShowChanged → (dynamic Function(bool show)?)
-
final
- onTapAddEmojiMenu → (dynamic Function()?)
-
final
- onTapCopyMenu → (dynamic Function()?)
-
Click the copy button event on the menu
final
- onTapDelMenu → (dynamic Function()?)
-
Click the delete button event on the menu
final
- onTapForwardMenu → (dynamic Function()?)
-
Click the forward button event on the menu
final
- onTapLeftAvatar → (dynamic Function()?)
-
Click on the avatar event on the left side of the chat window
final
- onTapMultiMenu → (dynamic Function()?)
-
final
- onTapQuoteMsg → (dynamic Function()?)
-
final
- onTapReplyMenu → (dynamic Function()?)
-
Click the reply button event on the menu
final
- onTapRevokeMenu → (dynamic Function()?)
-
Click the revoke button event on the menu
final
- onTapRightAvatar → (dynamic Function()?)
-
Click on the avatar event on the right side of the chat window
final
- onTapTranslationMenu → (dynamic Function()?)
-
final
- onViewMessageReadStatus → (dynamic Function()?)
-
预览群消息已读状态
final
- padding → EdgeInsetsGeometry?
-
final
-
patterns
→ List<
MatchPattern> -
final
-
popPageCloseMenuSubject
→ Subject<
bool> ? -
点击系统软键盘返回键关闭菜单
final
- readingDuration → int
-
阅读时长s
final
- rightAvatarUrl → String?
-
final
- rightBubbleColor → Color
-
Message background on the right side of the chat window
发送的消息的气泡背景色
final
- rightName → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLongPressMenu → bool
-
显示长按菜单
final
- showNoticeMessage → bool
-
将公告消息做普通消息显示
final
- textScaleFactor → double
-
final
- textStyle → TextStyle?
-
Download progress of pictures, videos, and files
Style of text content
文字消息的样式
final
- timeDecoration → BoxDecoration?
-
时间装饰
final
- timePadding → EdgeInsetsGeometry?
-
上下间距
final
- timeStr → String?
-
final
- timeStyle → TextStyle?
-
消息时间的样式
final
- visibilityChange → ItemVisibilityChange?
-
Whether the current message item is visible,
used to process whether the message has been read event
当前消息是否处于界面可见位置
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ChatItemViewState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited