kmaterialButtonRRB function
Widget
kmaterialButtonRRB(
- String text, {
- TextStyle? textStyle,
- int? height,
- int? minWidth,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- Color? background,
- Color? borderColor,
- int? borderWidth,
- int? radius,
- bool isDisabled = true,
- Color? disabledTextColor,
- Color? disabledColor,
- Color? disableBorderColor,
- bool clearElevation = false,
- VoidCallback? onClick,
MaterialButton RoundedRectangleBorder形状
text
文案
textStyle
文案样式
height
高度
minWidth
最小宽度
margin
外边距
padding
内边距
background
背景色
borderColor
边框颜色
borderWidth
边框宽度
radius
边框圆角
isDisabled
是否可点击
disabledTextColor
不可点击的文字颜色
disabledColor
不可点击的背景颜色
disableShape
不可点击的形状
clearElevation
去掉阴影
onClick
点击事件
Implementation
Widget kmaterialButtonRRB(
String text, {
TextStyle? textStyle,
int? height,
int? minWidth,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? padding,
Color? background,
Color? borderColor,
int? borderWidth,
int? radius,
bool isDisabled = true,
Color? disabledTextColor,
Color? disabledColor,
Color? disableBorderColor,
bool clearElevation = false,
VoidCallback? onClick,
}) {
return kmaterialButton(
text,
textStyle: textStyle,
height: height,
minWidth: minWidth,
margin: margin,
padding: padding,
background: background,
shape: RoundedRectangleBorder(
side: BorderSide(
color: borderColor ?? (background ?? Colors.transparent),
width: (borderWidth?.w ?? 1.0),
),
borderRadius: BorderRadius.all(
Radius.circular(radius?.r ?? 0),
),
),
isDisabled: isDisabled,
disabledTextColor: disabledTextColor,
disabledColor: disabledColor,
onClick: onClick,
disableShape: RoundedRectangleBorder(
side: BorderSide(
color: disableBorderColor ?? (disabledColor ?? Colors.transparent),
width: (borderWidth?.w ?? 1.0),
),
borderRadius: BorderRadius.all(
Radius.circular(radius?.r ?? 0),
),
),
clearElevation: clearElevation
);
}