VTextButton constructor

const VTextButton({
  1. Key? key,
  2. double height = 51,
  3. String text = '',
  4. double width = double.infinity,
  5. String? textColor,
  6. double fontSize = 16,
  7. String? disabledBgColor,
  8. String? bgColor = "#cd0000",
  9. String? imageBg,
  10. VoidCallback? onPressed,
  11. bool hasBorder = false,
  12. TextStyle? textStyle,
  13. BorderRadius? radius = const BorderRadius.all(Radius.circular(6)),
  14. Gradient? gradient,
})

Implementation

const VTextButton({
  Key? key,
  this.height = 51,
  this.text = '',
  this.width = double.infinity,
  this.textColor,
  this.fontSize = 16,
  this.disabledBgColor,
  this.bgColor = "#cd0000",
  this.imageBg,
  this.onPressed, // 传空为disabled状态
  this.hasBorder = false,
  this.textStyle,
  this.radius = const BorderRadius.all(Radius.circular(6)),
  this.gradient
}) : super(key: key);