CustomButton constructor
CustomButton({
- Key? key,
- Color? color,
- bool enabled = true,
- Gradient? customGradient,
- List<
BoxShadow> ? customBoxShadow, - Color? borderColor,
- required String text,
- bool isFlexible = false,
- dynamic onTap()?,
- double horizontalPadding = 0,
- double horizontalMargin = 0,
- double? borderRadius,
- bool isBorder = false,
- double verticalMargin = 0,
- double verticalPadding = 8,
- double? width,
- bool showGradient = false,
- bool showShadow = false,
- double? height,
- Color? textColor,
- FontWeight? fontWeight,
- double? fontSize,
- TextAlign textAlign = TextAlign.center,
- String? fontFamily,
- bool load = false,
- Widget? suffix,
- Widget? prefix,
- bool isSolid = true,
this is the constructor of the custom button.
Implementation
CustomButton({
super.key,
Color? color,
this.enabled = true,
Gradient? customGradient,
List<BoxShadow>? customBoxShadow,
this.borderColor,
required this.text,
this.isFlexible = false,
this.onTap,
this.horizontalPadding = 0,
this.horizontalMargin = 0,
double? borderRadius,
this.isBorder = false,
this.verticalMargin = 0,
this.verticalPadding = 8,
this.width,
this.showGradient = false,
this.showShadow = false,
this.height,
this.textColor,
this.fontWeight,
this.fontSize,
this.textAlign = TextAlign.center,
this.fontFamily,
this.load = false,
this.suffix,
this.prefix,
this.isSolid = true,
}) : borderRadius = borderRadius ?? CustomStylesConfig.globalBorderRadius,
customBoxShadow = customBoxShadow ?? CustomStylesConfig.buttonBoxShadow,
customGradient = customGradient ?? CustomStylesConfig.buttonGradient,
color = color ?? CustomStylesConfig.primaryColor;