CustomButton constructor

const CustomButton({
  1. Key? key,
  2. String? buttonText,
  3. required VoidCallback onTap,
  4. Color? buttonColor,
  5. double? width,
  6. TextStyle? buttonTextStyle,
  7. Widget? icon,
  8. BorderRadius? buttonRadius,
  9. EdgeInsets? buttonPadding,
  10. Widget? suffixWidget,
  11. Color? borderColor,
  12. Widget? prefixWidget,
  13. double textPadding = 0.0,
  14. double borderWidth = 1.5,
  15. bool disabled = false,
  16. double suffixPadding = 21,
  17. MainAxisSize? mainAxisSize,
  18. double prefixWidgetPadding = 5,
  19. bool loading = false,
})

Implementation

const CustomButton({
  super.key,
  this.buttonText,
  required this.onTap,
  this.buttonColor,
  // this.height = 50,
  this.width,
  this.buttonTextStyle,
  this.icon,
  this.buttonRadius,
  this.buttonPadding,
  this.suffixWidget,
  this.borderColor,
  this.prefixWidget,
  this.textPadding = 0.0,
  this.borderWidth = 1.5,
  this.disabled = false,
  this.suffixPadding = 21,
  this.mainAxisSize,
  this.prefixWidgetPadding = 5,
  this.loading = false,
});