ChatBubble class

聊天消息气泡组件 支持左右方向的小尾巴

Inheritance

Constructors

ChatBubble({Key? key, required Widget child, Color color = Colors.white, ChatBubbleDirection direction = ChatBubbleDirection.right, double radius = 12, double tailSize = 8, double tailHeight = 8, TailPosition tailPosition = TailPosition.center, double tailOffset = 0, bool showTail = true, double tailCurve = 0.5, double tailAmplitude = 0.5})
const

Properties

child → Widget
消息内容
final
color → Color
气泡颜色
final
direction → ChatBubbleDirection
气泡方向:左(别人)或右(自己)
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
radius → double
圆角大小
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showTail → bool
是否显示尾巴
final
tailAmplitude → double
尾巴弯曲幅度(0-1),控制尾巴上下拉伸的幅度
final
tailCurve → double
尾巴弯曲程度(0-1),越大越弯曲圆润
final
tailHeight → double
尾巴突出高度(尾巴尖超出气泡边缘的距离)
final
tailOffset → double
尾巴垂直偏移量(在tailPosition基础上叠加)
final
tailPosition → TailPosition
尾巴垂直位置
final
tailSize → double
小尾巴大小(基础大小)
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
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
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, 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