CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback onPressed,
  4. Color? color = Colors.blue,
  5. double? width,
  6. double? height,
})

Creates a CustomButton with customizable text, color, size, and action.

Implementation

const CustomButton({
  Key? key,
  required this.text,
  required this.onPressed,
  this.color = Colors.blue,
  this.width,
  this.height,
}) : super(key: key);