ButtonX constructor
const
ButtonX(
- String text, {
- Key? key,
- ButtonType type = ButtonType.general,
- double? borderRadius,
- double? borderWidth,
- Color? backgroundColor,
- Color? foregroundColor,
- EdgeInsetsGeometry? innerPadding,
- Size? minSize,
- dynamic onPressed()?,
- dynamic onLongPress()?,
- dynamic onHover()?,
- dynamic onFocusChange()?,
- ButtonStyle? style,
- FocusNode? focusNode,
- bool autofocus = false,
- Clip clipBehavior = Clip.none,
- Widget? child,
- Color? textColor,
- double? textSize,
- FontWeight? textWeight,
- TextStyle? textStyle,
- IconData? icon,
- double? iconSize,
- bool? dot,
- String? badge,
Implementation
const ButtonX(
this.text, {
super.key,
this.type = ButtonType.general,
this.borderRadius,
this.borderWidth,
this.backgroundColor, // 按钮背景颜色
this.foregroundColor, // 文本及图标颜色
this.innerPadding, // 内边距
this.minSize, // 最小尺寸限制
this.onPressed,
this.onLongPress,
this.onHover,
this.onFocusChange,
this.style,
this.focusNode,
this.autofocus = false,
this.clipBehavior = Clip.none,
this.child,
this.textColor,
this.textSize,
this.textWeight,
this.textStyle,
this.icon,
this.iconSize,
this.dot,
this.badge,
});