SessionMessage class

/ 消息渲染

Inheritance

Constructors

SessionMessage.new({Key? key, String widgetName = 'SessionMessage', required Message message, required Message? prevMsg, required bool showNick, double nickSpace = 2.0, EdgeInsets outerBoxPadding = const EdgeInsets.all(outerPaddingDefault), EdgeInsets innerTxtPadding = const EdgeInsets.only(left: outerPaddingDefault + 2, right: outerPaddingDefault - 2, top: outerPaddingDefault, bottom: outerPaddingDefault), double innerTxtSpacing = 0.15, EdgeInsets innerBoxPadding = const EdgeInsets.symmetric(horizontal: outerPaddingDefault + 1, vertical: outerPaddingDefault), Size bubbleTriangleSize = const Size(8.0, 8.0), BorderRadius bubbleRectangleRadius = const BorderRadius.all(Radius.circular(4.0)), required int onGetPictures(Message msg, List<String> urlList, List<String> heroList), required String onGetImgHeroTag(Message msg), required void onHeadLongPress(Message msg), required void onBodyLongPress(Message msg)})

Properties

bubbleRectangleRadius BorderRadius
final
bubbleTriangleSize Size
final
defaultRouteName String
默认的路由名称
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
innerBoxPadding EdgeInsets
final
innerTxtPadding EdgeInsets
final
innerTxtSpacing double
final
isInitedByVmware bool
真实超类实例是否被虚拟机初始化过,即该实例是否为虚拟机内部定义类的实例
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
message → Message
final
nickSpace double
final
onBodyLongPress → void Function(Message msg)
final
onGetImgHeroTag String Function(Message msg)
final
onGetPictures int Function(Message msg, List<String> urlList, List<String> heroList)
final
onHeadLongPress → void Function(Message msg)
final
outerBoxPadding EdgeInsets
final
prevMsg → Message?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showNick bool
final
thisNativeValue → dynamic
内部定义类的实例在运行时可能添加了VmValue包装,这个方法用来读取原生this值
no setterinherited
widgetLogLabel String
小部件日志标签
no setterinherited
widgetName String
小部件的名称
finalinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
getProperty(String propertyName) → VmValue
以先子类后超类的顺序读取实例字段
inherited
hasChildProperty(String propertyName) bool
实例的子类字段作用域中存在某字段
inherited
hasSuperProperty(String propertyName) bool
实例的超类字段作用域中存在某字段
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(BuildContext context) Widget
执行build逻辑的方法
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toJson() Map<String, dynamic>
转换为易读的JSON对象
inherited
toString({dynamic minLevel}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) 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

Static Properties

customBodyBuilder List<Widget> Function(BuildContext context, ThemeData themeData, Color? dividerColor, Message message)
自定义消息渲染
getter/setter pair
onCustomBodyTap ↔ void Function(BuildContext context, Message message)
自定义消息点击
getter/setter pair

Static Methods

getRedpackHint(Message message, {required bool showValue}) String
isAlphaRedpack(Message message) bool
showRedpackCard(BuildContext context, {required Message? msg, required ObjectId? msgId, bool forAdmin = false}) → void

Constants

outerPaddingDefault → const double
默认气泡外边距
redpackMainColor → const Color