CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback onPressed,
  4. ButtonType type = ButtonType.primary,
  5. IconData? icon,
  6. double? width,
  7. double height = 48.0,
  8. double borderRadius = 8.0,
  9. Color? backgroundColor,
  10. Color? textColor,
  11. Color? iconColor,
  12. bool isLoading = false,
  13. bool isDisabled = false,
  14. EdgeInsetsGeometry? padding,
  15. double fontSize = 16.0,
  16. FontWeight fontWeight = FontWeight.w600,
})

Implementation

const CustomButton({
  Key? key,
  required this.text,
  required this.onPressed,
  this.type = ButtonType.primary,
  this.icon,
  this.width,
  this.height = 48.0,
  this.borderRadius = 8.0,
  this.backgroundColor,
  this.textColor,
  this.iconColor,
  this.isLoading = false,
  this.isDisabled = false,
  this.padding,
  this.fontSize = 16.0,
  this.fontWeight = FontWeight.w600,
}) : super(key: key);