CustomButtonBase class abstract
ButtonBase 按钮基类
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CustomButtonBase
- Implementers
Constructors
-
CustomButtonBase.new({required Function? onPressed, Key? key, VoidCallback? onLongPress, ValueChanged<
bool> ? onHover, ValueChanged<bool> ? onFocusChange, ButtonStyle? style, FocusNode? focusNode, WidgetStatesController? statesController, Clip clipBehavior = Clip.none, bool autofocus = false, CustomButtonSize? size, double? width, double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding}) -
ButtonBase 按钮基类
const
Properties
- autofocus → bool
-
自动聚焦
final
- clipBehavior → Clip
-
裁剪方式
final
- focusNode → FocusNode?
-
焦点节点
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
- margin → EdgeInsetsGeometry?
-
外边距
final
-
onFocusChange
→ ValueChanged<
bool> ? -
焦点变化回调
final
-
onHover
→ ValueChanged<
bool> ? -
悬停回调
final
- onLongPress → VoidCallback?
-
长按回调
final
- onPressed → Function?
-
点击回调
final
- padding → EdgeInsetsGeometry?
-
内边距
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → CustomButtonSize?
-
尺寸
final
- statesController → WidgetStatesController?
-
状态控制器
final
- style → ButtonStyle?
-
样式
final
- width → double?
-
宽度
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.
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
-
getButtonStyle(
{Color? foregroundColor, Color? backgroundColor, CustomButtonSize? size}) → ButtonStyle - 获取按钮样式
-
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