CJReverseThemeStateTextButton constructor
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 childBuider(
- bool bSelected
- bool enable = true,
- bool selected = false,
- Color? normalBackgroundHighlightColor,
- Color? selectedBackgroundHighlightColor,
- double? highlightOpacity,
- 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,
);