AntdButton class

@t 按钮 @g 通用 @o 99 @d 用于开始一个即时操作。 @u 标记了一个或封装一组操作命令,响应用户点击行为,触发相应的业务逻辑。

Inheritance

Constructors

AntdButton({Key? key, AntdButtonStyle? style, AntdStyleBuilder<AntdButtonStyle, AntdButton>? styleBuilder, bool? block, AntdColor? color = AntdColor.primary, bool? disabled, AntdButtonFill? fill = AntdButtonFill.solid, AntdButtonShape? shape, AntdSize size = AntdSize.middle, FutureVoidCallback? onLoadingTap, GestureTapCallback? onTap, Widget? child, Widget? icon, bool? loading, Duration? throttle, Duration? debounce, HitTestBehavior? behavior})
const

Properties

behavior → HitTestBehavior?
点击事件命中测试行为
final
block → bool?
是否充满父容器宽度
final
child → Widget?
按钮内容组件
final
color → AntdColor?
按钮主题色
final
debounce → Duration?
点击事件防抖间隔(默认关闭)
final
disabled → bool?
是否禁用状态
final
fill → AntdButtonFill?
按钮填充模式
final
hashCode → int
The hash code for this object.
no setterinherited
icon → Widget?
前缀图标组件
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loading → bool?
是否显示加载状态
final
onLoadingTap → FutureVoidCallback?
支持自动loading状态的异步点击事件
final
onTap → GestureTapCallback?
点击事件回调
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → AntdButtonShape?
按钮形状样式
final
size → AntdSize
按钮尺寸规格
final
style → AntdButtonStyle?
样式
finalinherited
styleBuilder → AntdStyleBuilder<AntdButtonStyle, AntdButton>?
动态样式
finalinherited
throttle → Duration?
点击事件节流间隔(默认开启)
final

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) → AntdButtonStyle
override
getFinalStyle(BuildContext context, AntdButtonStyle style, AntdMapToken token) → AntdButtonStyle
inherited
getInputStyle(BuildContext context) → AntdButtonStyle?
inherited
getStyle(BuildContext context) → AntdButtonStyle
inherited
getStyleBuilder(BuildContext context) → AntdStyleBuilder<AntdButtonStyle, AntdButton>?
inherited
getThemeStyle(BuildContext context, AntdTheme theme) → AntdStyleBuilder<AntdButtonStyle, AntdButton>?
override
getWidget(BuildContext context) → AntdButton
override
margeStyle(AntdButtonStyle defaultStyle, AntdButtonStyle? style) → AntdButtonStyle
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