ButtonKit constructor

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

Creates a ButtonKit. All of the parameters marked required must be provided.

  • text: The button label text.
  • textColor: Color for the label text.
  • bgColor: Background color of the button.
  • press: Callback executed when the button is pressed.
  • radius: Border radius of the button (defaults to 10.0).
  • textSize: Font size for the label (defaults to 14.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 ElevatedButton (defaults to 0.0).

Implementation

const ButtonKit({
  super.key,
  required this.text,
  required this.textColor,
  required this.bgColor,
  required this.press,
  this.radius,
  this.textSize,
  this.width,
  this.height,
  this.weight,
  this.elevation,
});