CQTSThemeBorderButton constructor
CQTSThemeBorderButton({
- Key? key,
- double? width,
- double? height,
- required CQTSThemeBGType borderColorType,
- bool needHighlight = false,
- required String title,
- TextStyle? titleStyle,
- double cornerRadius = 5.0,
- bool enable = true,
- required VoidCallback onPressed,
Implementation
CQTSThemeBorderButton({
Key? key,
double? width,
double? height,
required CQTSThemeBGType borderColorType,
bool needHighlight = false, // 是否需要高亮样式(默认false)
required String title,
TextStyle? titleStyle,
double cornerRadius = 5.0,
bool enable = true,
required VoidCallback onPressed,
}) : super(
key: key,
width: width,
height: height,
childBuider: (bSelected) {
return Text(
title,
style: titleStyle ?? TextStyle(fontSize: 13.0),
);
},
enable: enable,
selected: false,
onPressed: onPressed,
cornerRadius: cornerRadius,
normalBGColor: themeOppositeColor(borderColorType),
normalTextColor: themeColor(borderColorType),
normalBorderWidth: 1.0,
normalBorderColor: themeColor(borderColorType),
// normalHighlightColor: Colors.pink,
highlightOpacity: needHighlight ? 0.7 : 1.0,
);