CJStateTextButton constructor

CJStateTextButton({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. BoxConstraints? constraints,
  5. EdgeInsetsGeometry? margin,
  6. EdgeInsetsGeometry? padding,
  7. required Widget childBuider(
    1. bool bSelected
    ),
  8. VoidCallback? onPressed,
  9. bool? enable = true,
  10. double disableOpacity = 0.5,
  11. bool selected = false,
  12. double cornerRadius = 5.0,
  13. required Color normalBGColor,
  14. required Color normalTextColor,
  15. Color? normalBorderColor,
  16. double? normalBorderWidth = 0.0,
  17. Color? normalBackgroundHighlightColor,
  18. Color? selectedBGColor,
  19. Color? selectedTextColor,
  20. Color? selectedBorderColor,
  21. double? selectedBorderWidth = 0.0,
  22. Color? selectedBackgroundHighlightColor,
  23. double? highlightOpacity,
})

Implementation

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);