AntdBadge class

@t 徽标 @g 引导提示 @o 12 @d 在右上角展示数字、文字、小红点。 @u 适用于产品化的新消息、新功能、新服务等内容的提醒,通过醒目视觉形式吸引用户处理。

Inheritance

Constructors

AntdBadge.new({Key? key, AntdBadgeStyle? style, AntdStyleBuilder<AntdBadgeStyle, AntdBadge>? styleBuilder, bool? bordered, AntdColor? color = AntdColor.danger, Widget? badge, bool? dot, AntdBadgePosition position = AntdBadgePosition.topRight, Widget? child, Offset? offset})
const

Properties

badge Widget?
徽标显示内容(数字/文字等)
final
bordered bool?
是否显示边框(默认false)
final
child Widget?
徽标包裹的子组件
final
color AntdColor?
徽标背景色/小圆点颜色
final
dot bool?
是否显示为小红点而非内容(默认false)
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
offset Offset?
徽标自定义偏移量(相对默认位置调整)
final
position AntdBadgePosition
徽标相对于子组件的位置
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style AntdBadgeStyle?
样式
finalinherited
styleBuilder AntdStyleBuilder<AntdBadgeStyle, AntdBadge>?
动态样式
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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
getDefaultStyle(BuildContext context, AntdTheme theme, AntdMapToken token) AntdBadgeStyle
override
getFinalStyle(BuildContext context, AntdBadgeStyle style, AntdMapToken token) AntdBadgeStyle
inherited
getInputStyle(BuildContext context) AntdBadgeStyle?
inherited
getStyle(BuildContext context) AntdBadgeStyle
inherited
getStyleBuilder(BuildContext context) AntdStyleBuilder<AntdBadgeStyle, AntdBadge>?
inherited
getThemeStyle(BuildContext context, AntdTheme theme) AntdStyleBuilder<AntdBadgeStyle, AntdBadge>?
override
getWidget(BuildContext context) AntdBadge
override
margeStyle(AntdBadgeStyle defaultStyle, AntdBadgeStyle? style) AntdBadgeStyle
override
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