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