CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback? onPressed,
  4. bool isLoading = false,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. Color? disabledBackgroundColor,
  8. Color? loadingIndicatorColor,
  9. double? width,
  10. double height = 50,
  11. double borderRadius = 10,
  12. double fontSize = 18,
  13. FontWeight? fontWeight,
  14. EdgeInsetsGeometry? padding,
  15. Widget? prefixIcon,
  16. Widget? suffixIcon,
})

Implementation

const CustomButton({
  Key? key,
  required this.text,
  required this.onPressed,
  this.isLoading = false,
  this.backgroundColor,
  this.textColor,
  this.disabledBackgroundColor,
  this.loadingIndicatorColor,
  this.width,
  this.height = 50,
  this.borderRadius = 10,
  this.fontSize = 18,
  this.fontWeight,
  this.padding,
  this.prefixIcon,
  this.suffixIcon,
}) : super(key: key);