CJReverseThemeStateTextButton constructor

CJReverseThemeStateTextButton({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. BoxConstraints? constraints,
  5. double cornerRadius = 5.0,
  6. required Color themeColor,
  7. required Color themeOppositeColor,
  8. double normalBorderWidth = 0.0,
  9. double selectedBorderWidth = 0.0,
  10. required Widget childBuider(
    1. bool bSelected
    ),
  11. bool enable = true,
  12. bool selected = false,
  13. Color? normalBackgroundHighlightColor,
  14. Color? selectedBackgroundHighlightColor,
  15. double? highlightOpacity,
  16. required VoidCallback onPressed,
})

Implementation

CJReverseThemeStateTextButton({
  Key? key,
  double? width,
  double? height,
  BoxConstraints? constraints,
  double cornerRadius = 5.0,
  required Color themeColor,
  required Color themeOppositeColor,
  double normalBorderWidth = 0.0,
  double selectedBorderWidth = 0.0,
  required Widget Function(bool bSelected) childBuider,
  bool enable = true,
  bool selected = false,
  Color? normalBackgroundHighlightColor,
  Color? selectedBackgroundHighlightColor,
  double? highlightOpacity, // 没有设置高亮 highlightColor 的时候,取原色的多少透明度值
  required VoidCallback onPressed,
}) : super(
        key: key,
        width: width,
        height: height,
        constraints: constraints,
        childBuider: childBuider,
        enable: enable,
        selected: selected,
        onPressed: onPressed,
        cornerRadius: cornerRadius,
        normalBGColor: themeColor,
        normalTextColor: themeOppositeColor,
        normalBorderWidth: normalBorderWidth,
        normalBorderColor: themeColor,
        normalBackgroundHighlightColor: normalBackgroundHighlightColor,
        selectedBGColor: themeOppositeColor,
        selectedTextColor: themeColor,
        selectedBorderWidth: selectedBorderWidth,
        selectedBorderColor: themeColor,
        selectedBackgroundHighlightColor: selectedBackgroundHighlightColor,
        highlightOpacity: highlightOpacity,
      );