PrimaryButton class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PrimaryButton
Constructors
- PrimaryButton({Key? key, String text = "", required VoidCallback onPressed, double fontSize = 14, Color textColor = const Color(0xff222222), FontWeight? fontWeight, Color disableTextColor = const Color(0x80222222), double? width, double? height = 38, Color backgroundColor = const Color(0xffEEEBD7), Color disableBackgroundColor = const Color(0xffEEEBD7), Color? overlayColor, BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(30)), Widget? child, Color borderColor = const Color(0xffEEEBD7), double borderWidth = 1, EdgeInsetsGeometry margin = EdgeInsets.zero, bool visible = true, EdgeInsetsGeometry padding = EdgeInsets.zero, bool enable = true, dynamic buildCall(PrimaryButtonController controller)?, AlignmentGeometry? alignment})
-
const
Properties
- alignment → AlignmentGeometry?
-
final
- backgroundColor → Color
-
背景颜色
final
- borderColor → Color
-
边框颜色
final
- borderRadius → BorderRadiusGeometry
-
组件圆角
final
- borderWidth → double
-
边框宽度
final
- buildCall → dynamic Function(PrimaryButtonController controller)?
-
final
- child → Widget?
-
子组件,设置该值后文本相关属性失效
final
- disableBackgroundColor → Color
-
禁用背景颜色
final
- disableTextColor → Color
-
禁用文本颜色
final
- enable → bool
-
按钮是否启用
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
- margin → EdgeInsetsGeometry
-
按钮外边距
final
- onPressed → VoidCallback
-
事件回调
final
- overlayColor → Color?
-
按钮按下时颜色
final
- padding → EdgeInsetsGeometry
-
按钮内边距
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
按钮文本
final
- textColor → Color
-
文本颜色
final
- visible → bool
-
是否显示组件
final
- width → double?
-
组件宽度
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _PrimaryButtonState -
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
-
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