CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String label,
  3. dynamic onPressed()?,
  4. Color? primary,
  5. Color? borderColor,
  6. Color? labelColor,
  7. double? fontSize,
  8. FontWeight? fontWeight,
  9. TextStyle? labelStyle,
  10. String? iconData,
  11. double? height,
  12. double? borderWidth,
  13. double? elevation,
  14. Color? boxShadowColor,
  15. bool isBorder = false,
  16. double? width,
  17. double? borderRadiusAll,
  18. double? marginHorizontal,
  19. double? marginVertical,
  20. EdgeInsetsGeometry? margin,
  21. double? contentPadding,
  22. double? contentHorizontalPadding,
  23. double? contentVerticalPadding,
  24. EdgeInsetsGeometry? padding,
  25. bool isDisable = false,
  26. String? prefixImage,
  27. String? suffixImage,
  28. double? suffixImageHeight,
  29. double? suffixImageWidth,
  30. Color? suffixImageColor,
  31. double? prefixImageHeight,
  32. double? prefixImageWidth,
  33. Color? prefixImageColor,
  34. bool loading = false,
  35. Color? loadingColor,
  36. Color? disableColor,
  37. double? loadingHeight,
  38. double? loadingWidth,
  39. double loadingStrokeWidth = 4.0,
  40. BorderRadiusGeometry? borderRadius,
})

Implementation

const CustomButton({
  Key? key,
  required this.label,
  this.onPressed,
  this.primary,
  this.borderColor,
  this.labelColor,
  this.fontSize,
  this.fontWeight,
  this.labelStyle,
  this.iconData,
  this.height,
  this.borderWidth,
  this.elevation,
  this.boxShadowColor,
  this.isBorder = false,
  this.width,
  this.borderRadiusAll,
  this.marginHorizontal,
  this.marginVertical,
  this.margin,
  this.contentPadding,
  this.contentHorizontalPadding,
  this.contentVerticalPadding,
  this.padding,
  this.isDisable = false,
  this.prefixImage,
  this.suffixImage,
  this.suffixImageHeight,
  this.suffixImageWidth,
  this.suffixImageColor,
  this.prefixImageHeight,
  this.prefixImageWidth,
  this.prefixImageColor,
  this.loading = false,
  this.loadingColor,
  this.disableColor,
  this.loadingHeight,
  this.loadingWidth,
  this.loadingStrokeWidth = 4.0,
  this.borderRadius,
}) : super(key: key);