JuiButton class

JuiButton 是一个可自定义颜色、大小等属性的按钮组件

该组件支持不同的颜色、尺寸,并可配置是否可见、是否禁用等功能。

Inheritance

Constructors

JuiButton({Key? key, required JuiButtonColorType colorType, required JuiButtonSizeType sizeType, required String text, required VoidCallback onTap, bool visibility = true, double? width, double? fontSize, double circular = 24, double? height, double fontHeight = 1.0, bool disable = false, Color? backGroundColor, FontWeight fontWeight = FontWeight.normal})
创建 JuiButton 按钮
const

Properties

backGroundColor → Color?
按钮的背景颜色(可选)
final
circular → double
按钮的圆角大小
final
colorType → JuiButtonColorType
按钮颜色类型
final
disable → bool
按钮是否禁用
final
fontHeight → double
按钮文本的行高
final
fontSize → double?
按钮字体大小(可选)
final
fontWeight → FontWeight
按钮文本的字体粗细
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
按钮的高度(可选)
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → VoidCallback
按钮点击时的回调函数
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeType → JuiButtonSizeType
按钮尺寸类型
final
text → String
按钮文本内容
final
visibility → bool
按钮是否可见
final
width → 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

Static Methods

updateSizeConfig(JuiButtonSizeType type, JuiButtonSizeConfig config) → void
更新按钮的尺寸配置