CJStateTextButton constructor
const
CJStateTextButton({
- Key? key,
- double? width,
- double? height,
- BoxConstraints? constraints,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- required Widget childBuider(
- bool bSelected
- VoidCallback? onPressed,
- bool? enable = true,
- double disableOpacity = 0.5,
- bool selected = false,
- double cornerRadius = 5.0,
- required Color normalBGColor,
- required Color normalTextColor,
- Color? normalBorderColor,
- double? normalBorderWidth = 0.0,
- Color? normalBackgroundHighlightColor,
- Color? selectedBGColor,
- Color? selectedTextColor,
- Color? selectedBorderColor,
- double? selectedBorderWidth = 0.0,
- Color? selectedBackgroundHighlightColor,
- double? highlightOpacity,
Implementation
const CJStateTextButton({
Key? key,
this.width,
this.height,
this.constraints,
this.margin,
this.padding,
required this.childBuider,
this.onPressed, // null时候会自动透传事件
this.enable = true,
this.disableOpacity = 0.5, // disable 时候,颜色的透明度
this.selected = false,
this.cornerRadius = 5.0,
required this.normalBGColor,
required this.normalTextColor,
this.normalBorderColor,
this.normalBorderWidth = 0.0,
this.normalBackgroundHighlightColor,
this.selectedBGColor,
this.selectedTextColor,
this.selectedBorderColor,
this.selectedBorderWidth = 0.0, // 按钮选中时候的边框宽度
this.selectedBackgroundHighlightColor,
this.highlightOpacity,
}) : super(key: key);