ButtonKitGradient constructor

const ButtonKitGradient({
  1. Key? key,
  2. required String text,
  3. required Color textColor,
  4. required Color bgColor1,
  5. required Color bgColor2,
  6. required VoidCallback press,
  7. double? radius,
  8. double? textSize,
  9. double? width,
  10. double? height,
  11. FontWeight? weight,
  12. double? elevation,
  13. TextAlign? align,
})

Creates a ButtonKitGradient. Required parameters:

  • text: The button label text.
  • textColor: Color for the label text.
  • bgColor1, bgColor2: Gradient colors (start and end).
  • press: Callback when button is pressed.
  • radius: Border radius of the gradient container (defaults to 10.0).
  • textSize: Font size for the label (defaults to 12.0).
  • width: Width of the button (defaults to double.infinity).
  • height: Height of the button (defaults to 25.0).
  • weight: FontWeight for the label (defaults to FontWeight.w500).
  • elevation: Elevation for the inner ElevatedButton (defaults to 0.0).
  • align: Text alignment for the TextKit label (defaults to TextAlign.center).

Implementation

const ButtonKitGradient({
  super.key,
  required this.text,
  required this.textColor,
  required this.bgColor1,
  required this.bgColor2,
  required this.press,
  this.radius,
  this.textSize,
  this.width,
  this.height,
  this.weight,
  this.elevation,
  this.align,
});