ButtonX constructor

const ButtonX(
  1. String text, {
  2. Key? key,
  3. ButtonType type = ButtonType.general,
  4. double? borderRadius,
  5. double? borderWidth,
  6. Color? backgroundColor,
  7. Color? foregroundColor,
  8. EdgeInsetsGeometry? innerPadding,
  9. Size? minSize,
  10. dynamic onPressed()?,
  11. dynamic onLongPress()?,
  12. dynamic onHover(
    1. bool
    )?,
  13. dynamic onFocusChange(
    1. bool
    )?,
  14. ButtonStyle? style,
  15. FocusNode? focusNode,
  16. bool autofocus = false,
  17. Clip clipBehavior = Clip.none,
  18. Widget? child,
  19. Color? textColor,
  20. double? textSize,
  21. FontWeight? textWeight,
  22. TextStyle? textStyle,
  23. IconData? icon,
  24. double? iconSize,
  25. bool? dot,
  26. 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,
});