CQTSThemeBorderButton constructor

CQTSThemeBorderButton({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. required CQTSThemeBGType borderColorType,
  5. bool needHighlight = false,
  6. required String title,
  7. TextStyle? titleStyle,
  8. double cornerRadius = 5.0,
  9. bool enable = true,
  10. 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,
      );